Discussion:
rpm gives warning: can't get exclusive lock on /var/lib/rpm/Packages
sunhux G
2008-05-13 09:48:57 UTC
Permalink
Hi,

As I got a message on our Redhat Enterprise 4.5, :
Your GPG keyring does not contain public key ...


I copy & paste from https://www.redhat.com/security/team/key.html
those cryptic characters starting from the lines (inclusive)
-----BEGIN PGP PUBLIC KEY BLOCK-----
. . . . .
-----END PGP PUBLIC KEY BLOCK-----


As I saved this file in Windows to a thumb drive & use "cp " to
copy it, there's a lot of ^M characters in this file which I then do
"dos2unix /media/usbdisk/saved_file.txt"
Then copy the converted saved_file.txt to /usr/share/doc/rpm-4.5

& issue using root account :
rpm --import /usr/share/doc/rpm-4.5/saved_file.txt"
but got the error :
"warning: can't get exclusive lock on /var/lib/rpm/Packages"

What's the cause of the above error? I'm using root & the
protection of the saved_file.txt is 755.

I read somewhere that /var/lib/rpm/Packages could be locked,
so what can I do? I thought of renaming Packages to something
else & make another copy of Packages :

mv /var/lib/rpm/Packages /var/lib/rpm/Packages_2
cp -p /var/lib/rpm/Packages_2 /var/lib/rpm/Packages

Would this help? Appreciate any suggestions.


Thanks
U
devzero2000
2008-05-13 10:53:31 UTC
Permalink
fnctl transaction lock on rpmdb lost around : it'is advisory not mandatory
however.

In RHEL4 rpm 4.3.3 it was FHS compliant : try rm -f
/var/lock/rpm/transaction

(Aside) it is possible to set a rpm macros for disabling this behaviour.

Best Regards
Post by sunhux G
Hi,
Your GPG keyring does not contain public key ...
I copy & paste from https://www.redhat.com/security/team/key.html
those cryptic characters starting from the lines (inclusive)
-----BEGIN PGP PUBLIC KEY BLOCK-----
. . . . .
-----END PGP PUBLIC KEY BLOCK-----
As I saved this file in Windows to a thumb drive & use "cp " to
copy it, there's a lot of ^M characters in this file which I then do
"dos2unix /media/usbdisk/saved_file.txt"
Then copy the converted saved_file.txt to /usr/share/doc/rpm-4.5
rpm --import /usr/share/doc/rpm-4.5/saved_file.txt"
"warning: can't get exclusive lock on /var/lib/rpm/Packages"
What's the cause of the above error? I'm using root & the
protection of the saved_file.txt is 755.
I read somewhere that /var/lib/rpm/Packages could be locked,
so what can I do? I thought of renaming Packages to something
mv /var/lib/rpm/Packages /var/lib/rpm/Packages_2
cp -p /var/lib/rpm/Packages_2 /var/lib/rpm/Packages
Would this help? Appreciate any suggestions.
Thanks
U
_______________________________________________
Rpm-list mailing list
https://www.redhat.com/mailman/listinfo/rpm-list
sunhux G
2008-05-13 11:02:15 UTC
Permalink
Thanks,

just one more somewhat unrelated question :

can the same key which I copied from
-----BEGIN PGP PUBLIC KEY BLOCK-----
. . . . .
-----END PGP PUBLIC KEY BLOCK-----
be used on multiple Linux servers.


Thanks
U
Post by devzero2000
fnctl transaction lock on rpmdb lost around : it'is advisory not
mandatory however.
In RHEL4 rpm 4.3.3 it was FHS compliant : try rm -f
/var/lock/rpm/transaction
(Aside) it is possible to set a rpm macros for disabling this behaviour.
Best Regards
Post by sunhux G
Hi,
Your GPG keyring does not contain public key ...
I copy & paste from https://www.redhat.com/security/team/key.html
those cryptic characters starting from the lines (inclusive)
-----BEGIN PGP PUBLIC KEY BLOCK-----
. . . . .
-----END PGP PUBLIC KEY BLOCK-----
As I saved this file in Windows to a thumb drive & use "cp " to
copy it, there's a lot of ^M characters in this file which I then do
"dos2unix /media/usbdisk/saved_file.txt"
Then copy the converted saved_file.txt to /usr/share/doc/rpm-4.5
rpm --import /usr/share/doc/rpm-4.5/saved_file.txt"
"warning: can't get exclusive lock on /var/lib/rpm/Packages"
What's the cause of the above error? I'm using root & the
protection of the saved_file.txt is 755.
I read somewhere that /var/lib/rpm/Packages could be locked,
so what can I do? I thought of renaming Packages to something
mv /var/lib/rpm/Packages /var/lib/rpm/Packages_2
cp -p /var/lib/rpm/Packages_2 /var/lib/rpm/Packages
Would this help? Appreciate any suggestions.
Thanks
U
_______________________________________________
Rpm-list mailing list
https://www.redhat.com/mailman/listinfo/rpm-list
_______________________________________________
Rpm-list mailing list
https://www.redhat.com/mailman/listinfo/rpm-list
devzero2000
2008-05-13 11:53:56 UTC
Permalink
Sure
Post by sunhux G
Thanks,
can the same key which I copied from
-----BEGIN PGP PUBLIC KEY BLOCK-----
. . . . .
-----END PGP PUBLIC KEY BLOCK-----
be used on multiple Linux servers.
Thanks
U
Post by devzero2000
fnctl transaction lock on rpmdb lost around : it'is advisory not
mandatory however.
In RHEL4 rpm 4.3.3 it was FHS compliant : try rm -f
/var/lock/rpm/transaction
(Aside) it is possible to set a rpm macros for disabling this behaviour.
Best Regards
Post by sunhux G
Hi,
Your GPG keyring does not contain public key ...
I copy & paste from https://www.redhat.com/security/team/key.html
those cryptic characters starting from the lines (inclusive)
-----BEGIN PGP PUBLIC KEY BLOCK-----
. . . . .
-----END PGP PUBLIC KEY BLOCK-----
As I saved this file in Windows to a thumb drive & use "cp " to
copy it, there's a lot of ^M characters in this file which I then do
"dos2unix /media/usbdisk/saved_file.txt"
Then copy the converted saved_file.txt to /usr/share/doc/rpm-4.5
rpm --import /usr/share/doc/rpm-4.5/saved_file.txt"
"warning: can't get exclusive lock on /var/lib/rpm/Packages"
What's the cause of the above error? I'm using root & the
protection of the saved_file.txt is 755.
I read somewhere that /var/lib/rpm/Packages could be locked,
so what can I do? I thought of renaming Packages to something
mv /var/lib/rpm/Packages /var/lib/rpm/Packages_2
cp -p /var/lib/rpm/Packages_2 /var/lib/rpm/Packages
Would this help? Appreciate any suggestions.
Thanks
U
_______________________________________________
Rpm-list mailing list
https://www.redhat.com/mailman/listinfo/rpm-list
_______________________________________________
Rpm-list mailing list
https://www.redhat.com/mailman/listinfo/rpm-list
_______________________________________________
Rpm-list mailing list
https://www.redhat.com/mailman/listinfo/rpm-list
Loading...