LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise
User Name
Password
Linux - Enterprise This forum is for all items relating to using Linux in the Enterprise.

Notices


Reply
  Search this Thread
Old 12-05-2008, 09:59 AM   #1
nedzer
Member
 
Registered: Dec 2008
Posts: 44

Rep: Reputation: 15
rpm package install


Hi,

complete noob to linux

I'm running RHE Linux5

I try to install the package like so
# rpm -i compat-libstdc++-7.3-2.96.118.i386.rpm

using root profile
[root@moran tmp] ...(that's moran not moron )


This the result:

warning: compat-libstdc++-7.3-2.96.118.i386.rpm: Header V3 DSA signature: NOKEY, key ID db42a60e
warning: waiting for transaction lock on /var/lib/rpm/__db.000



further info..
# ls -l
gives
-rwxrwxrwx 1 user user 1054177 Dec 5 13:04 compat-libstdc++-7.3-2.96.118.i386.rpm

I did 'chmod' the rpm on the lame hope that this might alter the result.

Finally I tried
# rpm qa | grep libstdc++
to see did it install

nada comes up on screen

Any suggestions I'll try and thanks in advance for taking a look.
 
Old 12-05-2008, 04:17 PM   #2
tommylovell
Member
 
Registered: Nov 2005
Distribution: Fedora, Redhat
Posts: 372

Rep: Reputation: 101Reputation: 101
The "warning: ....... Header V3 DSA signature: NOKEY, ..." message is common and probably not your problem.

The second warning indicates either something else has the backend Berkeley database temporarily locked
(like that little Update applet, which should soon let it go); or there is a stale lock left on the database.

If you add the v and h flags to your rpm command, it should give you more information:
# rpm -ivh compat-libstdc++-7.3-2.96.118.i386.rpm

If it is waiting forever on the database lock, you can try removing it and see if that allows the install to proceed.
Worse comes to worse, there is an rpm command to rebuild the database.

Let us know what happens with the '-ivh'.
 
Old 12-08-2008, 04:12 AM   #3
nedzer
Member
 
Registered: Dec 2008
Posts: 44

Original Poster
Rep: Reputation: 15
Hi TommyLovell,

thanks for the post. No more info when I include the vh options, see below.

another user has suggested removing the "__db.000" altogether.

Cheers, Ed


[user@moran tmp]$ rpm -ivh compat-libstdc++-7.3-2.96.118.i386.rpm
warning: compat-libstdc++-7.3-2.96.118.i386.rpm: Header V3 DSA signature: NOKEY, key ID db42a60e
error: can't create transaction lock on /var/lib/rpm/__db.000
 
Old 12-08-2008, 04:47 AM   #4
hasanatizaz
Member
 
Registered: Nov 2007
Location: Pakistan
Distribution: Redhat and Debian
Posts: 305
Blog Entries: 1

Rep: Reputation: 34
in yum repository
gpgcheck=0
then try.
 
Old 12-08-2008, 12:04 PM   #5
tommylovell
Member
 
Registered: Nov 2005
Distribution: Fedora, Redhat
Posts: 372

Rep: Reputation: 101Reputation: 101
I'd agree with the suggestion to remove the database lock. I've seen that elsewhere
as a solution.

Did you try it and that's why the message says "can't create"?
Code:
error: can't create transaction lock on /var/lib/rpm/__db.000
(As root, you should be able to create any file anywhere (unless the file or directory has
an ext2/3 immutable attribute on it... So I'm not quite sure why it says "can't create".)

On my systems, that file is zero length (it has no content to worry about),
Code:
[root@athlon4k6 ~]# ls -l /var/lib/rpm/__db.000
-rw-r--r-- 1 root root 0 2008-11-23 21:38 /var/lib/rpm/__db.000
so you can 'touch' it to recreate it, then chown and chmod back to the way it was.

Code:
touch /var/lib/rpm/__db.000
chown root:root /var/lib/rpm/__db.000
chmod 644 /var/lib/rpm/__db.000
I saw on the PKWare site in one of their FAQ's (http://www.pkware.com/support-server/faqs):

Code:
9.  I tried to install PKZIP for Linux, I ran the command:

rpm –e <path to SecureZIP_Server.rpm>

and received the error:

can't create transaction lock on /var/lib/rpm/__db.000 error

This can be corrected with the following steps:

   1. Remove any file locks rm –rf /var/lib/rpm/_db*
   2. Remove any left over temp files in /var/lib/rmp/ with underscores, either single or double. For example, __db.000 - __db.004. This needs to be completed as root.
   3. Make a copy of the RPM directories (cd /var/lib mkdir rpm-backup rsync -av ./rpm/. ./rpm-backup/.)
   4. Rebuild the database (rpm –rebuilddb). Again, you need to be root.
   5. Rerun the rpm removal option.
If simply removing the database lock did not fix the problem, you might want to try this procedure.
There are multiple commands in step3 to backup. If on the same command line they would be separated by ';'s, like:
Code:
cd /var/lib; mkdir rpm-backup; rsync -av ./rpm/. ./rpm-backup/.
btw, to see if any process has the file open (unlikely), you can use the lsof command
Code:
[root@athlon4k6 ~]# ls -l /var/lib/rpm/__db.000
-rw-r--r-- 1 root root 0 2008-11-23 21:38 /var/lib/rpm/__db.000
[root@athlon4k6 ~]# lsof /var/lib/rpm/__db.000
[root@athlon4k6 ~]#
To prove lsof works, here it is against a file I know is always open
Code:
 
[root@athlon4k6 ~]# lsof /var/log/messages
COMMAND  PID USER   FD   TYPE DEVICE SIZE    NODE NAME
syslogd 1976 root    2w   REG  253,0  188 3507076 /var/log/messages
[root@athlon4k6 ~]#
Keep us posted.
 
Old 12-09-2008, 04:21 AM   #6
nedzer
Member
 
Registered: Dec 2008
Posts: 44

Original Poster
Rep: Reputation: 15
geniushasan/tommylovell,

thanks for the input.

set the 'gpgcheck=0'

I removed the __db files and it worked.

[root@moran tmp]# rpm -ivh compat-libstdc++-7.3-2.96.118.i386.rpm
warning: compat-libstdc++-7.3-2.96.118.i386.rpm: Header V3 DSA signature: NOKEY, key ID db42a60e
Preparing... ########################################### [100%]
package compat-libstdc++-7.3-2.96.118 is already installed

It's there now which is the main thing.

[root@moran /]# lsof /var/log/messages
bash: lsof: command not found
I'm on RH Ent 5.0 versino of linux?

Cheers,
 
Old 12-09-2008, 05:39 AM   #7
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,394
Blog Entries: 55

Rep: Reputation: 3565Reputation: 3565Reputation: 3565Reputation: 3565Reputation: 3565Reputation: 3565Reputation: 3565Reputation: 3565Reputation: 3565Reputation: 3565Reputation: 3565
Quote:
Originally Posted by nedzer View Post
bash: lsof: command not found
If 'rpm -q lsof' returns OK, then try '/usr/sbin/lsof'. The fact he can execute it without prepending a full path is a non-standard thing as far as I know.
 
Old 12-10-2008, 04:45 AM   #8
nedzer
Member
 
Registered: Dec 2008
Posts: 44

Original Poster
Rep: Reputation: 15
Thanks unSpawn,

[user@moran ~]$ rpm -q lsof
lsof-4.78-3

returned OK

I went to /usr/sbin/, and ran

[user@moran sbin]$ ./lsof

that spewed out a load of text detailing mainly mysqld processes.
e.g.
mysqld 31489 user 39u IPv4 556930 TCP localhost.localdomain:mysql->localhost.localdomain:43196 (ESTABLISHED)
mysqld 31489 user 40u IPv4 556954 TCP localhost.localdomain:mysql->localhost.localdomain:43197 (ESTABLISHED)
mysqld 31489 user 41u IPv4 556978 TCP localhost.localdomain:mysql->localhost.localdomain:43198 (ESTABLISHED)

At least I know this works now, but excuse my ignorance, how does it help?

I'm still unsure as to how I can check the __db.000 processes?

[eberwick@moran sbin]$ lsof /var/lib/rpm/__db.000
bash: lsof: command not found
[eberwick@moran sbin]$ ./lsof /var/lib/rpm/__db.000

Like most install issues this is no longer a show stopper for me having been superceeded with yet another problem, still curious however.

Thanks in advance.
 
Old 12-10-2008, 06:37 AM   #9
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,394
Blog Entries: 55

Rep: Reputation: 3565Reputation: 3565Reputation: 3565Reputation: 3565Reputation: 3565Reputation: 3565Reputation: 3565Reputation: 3565Reputation: 3565Reputation: 3565Reputation: 3565
For instance to see if files are kept open in directory /var/lib/rpm by any process you can do 'lsof -w -n +D/var/lib/rpm'.
 
  


Reply

Tags
install, package, rpm


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
Can't install a RPM package mobyuk Linux - Newbie 3 12-11-2008 06:24 AM
rpm package install - RealPlayer10GOLD.rpm tslinux Linux - Newbie 7 09-08-2007 10:28 PM
Where does rpm install package doublej Linux - Software 4 12-12-2005 04:51 AM
I can't install with RPM package. PICOspark Linux - Newbie 8 04-06-2005 07:40 AM
Install package with RPM nobyone Linux - Newbie 4 04-01-2004 11:50 AM

LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise

All times are GMT -5. The time now is 12:14 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