LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-05-2005, 04:11 PM   #1
zhouxjgester
LQ Newbie
 
Registered: Aug 2005
Location: canada
Posts: 8

Rep: Reputation: 0
rpm install failed if specified --dbpath


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?
 
Old 08-05-2005, 06:01 PM   #2
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Blue Ridge Mountain
Distribution: Debian Jessie, Linux Mint 17
Posts: 7,790

Rep: Reputation: 292Reputation: 292Reputation: 292
"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"

--dbpath should point to a valid rpm data base. So first you should create a rpm data base. I am not sure, but I think that the command to do that would be:

rpm --initdb /home/mydir/tmp

I suggest that you do not try the --initdb option as root so that you do not accidently destroy your real rpm data base.

See:

man rpm

--------------------------
Steve Stites
 
Old 08-05-2005, 06:10 PM   #3
zhouxjgester
LQ Newbie
 
Registered: Aug 2005
Location: canada
Posts: 8

Original Poster
Rep: Reputation: 0
I found the answer by myself

I'd like to share with people.

--initdb cannot help.

The tricks are:
1) dbpath should use a directory under local disk
2) The directory has to be created before run rpm. Empty directory is OK.
3) "provides" of spec file cannot work, and have to use --nodeps
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
RPM Failed dependencies louisb Linux - Enterprise 3 01-27-2005 02:58 PM
Failed dependencies in RPM louisb Linux - Enterprise 1 01-12-2005 03:37 AM
Failed dependencies with in RPM louisb Linux - Enterprise 1 01-10-2005 10:42 AM
RPM install - failed dependencies. aje Linux - General 3 11-10-2004 03:40 AM
RPM 'failed dependencies': Why can I not install any rpm packages? leontini Linux - Newbie 7 09-16-2003 01:44 AM


All times are GMT -5. The time now is 10:51 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration