PDA

View Full Version : rpm install failed if specified --dbpath


zhouxjgester
5th August 2005, 08:38 PM
I try to install something on a SuSe 8 box, the rpm version is 3.0.6.

However, if I run following command:

rpm -ivh --dbpath /home/mydir/tmp xxx.rpm

It always failed with following error msg:

cannot get exclusive lock on database
error: cannot open /home/mydir/tmp/packages.rpm

Even if I use root, it still fails if I specified --dbpath.

But if I do not specify --dbpath and run the rpm as root, it works.

/home/mydir/tmp is an empty directory I created for the this test. So it's not due to write permission.

Can any one shed a light for me?

markkuk
6th August 2005, 06:00 AM
You don't have a valid RPM database in /home/mydir/tmp. Try creating one by "rpm --rebuilddb --dbpath /home/mydir/tmp".