Yum corrupted on CentOS 6.2, Problem importing one the python modules.
Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Yum corrupted on CentOS 6.2, Problem importing one the python modules.
Hello Guys,
After a sudden power outage on a server where CentOS 6.2 is installed i can no longer use Yum.
Whenever i run Yum i get the following:
Code:
yum install sendmail
There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:
/lib/libldap-2.4.so.2: undefined symbol: ber_sockbuf_io_udp
Please install a package which provides this module, or
verify that the module is installed correctly.
It's possible that the above module doesn't match the
current version of Python, which is:
2.6.6 (r266:84292, Dec 7 2011, 20:38:36)
[GCC 4.4.6 20110731 (Red Hat 4.4.6-3)]
If you cannot solve this problem yourself, please go to
the yum faq at:
http://yum.baseurl.org/wiki/Faq
I have google the error but had no luck.
Have anyone faced a similar problem before?
I'd appreciate any clues to help me dig deeper.
Thanks.
IF those match the output of the what is installed ( the above rpm grep commands )
then force a reinstall
download the two
then
Code:
su -
cd To/The/Location/You/Saved/Them
rmp --install --force python-ldap-2.3.10-1.el6.i686.rpm
the
"python-2.6.6-29.el6_2.2.i686.rpm" may or may not need to be reinstalled
then you might want to upgrade to 6.3
this is a copy of the README "place-holder" in the 6.2 repo directory on the servers
Quote:
This directory (and version of CentOS) is depreciated. For normal users,
you should use /6/ and not /6.2/ in your path. Please see this FAQ
concerning the CentOS release scheme:
Thank you very much for the detailed reply, i wasn't aware that version 6.2 is not supported anymore.
Also last time i ran yum update, if i did, would be months ago.
That said, there also seems to be a problem with rpm and its database.
I ran rpm -qa | grep python it didn't return anything, then i ran rpm -qa and instead of listing the packages it returned:
Then i downloaded couple of rpm's to try to install and i got:
Code:
[root@insync tmp]# rpm -Uvh openldap-ltb-2.4.33-1.el6.i686.rpm
error: openldap-ltb-2.4.33-1.el6.i686.rpm: Header V4 DSA/SHA1 Signature, key ID 6d45bfc5: BAD
error: openldap-ltb-2.4.33-1.el6.i686.rpm cannot be installed
I googled a little and tried rebuilding and initiating the rpm database i stil got the same result.
I tried a force install on an irrelevant package just to try and i got:
Code:
[root@insync tmp]# rpm -vv --install --force python-myghty-1.1-11.el6.noarch.rpm
D: ============== python-myghty-1.1-11.el6.noarch.rpm
D: loading keyring from pubkeys in /var/lib/rpm/pubkeys/*.key
D: couldn't find any keys in /var/lib/rpm/pubkeys/*.key
D: loading keyring from rpmdb
D: opening db environment /var/lib/rpm cdb:mpool:joinenv
D: opening db index /var/lib/rpm/Packages rdonly mode=0x0
D: locked db index /var/lib/rpm/Packages
D: opening db index /var/lib/rpm/Name rdonly mode=0x0
D: read h# 1 Header sanity check: OK
D: added key gpg-pubkey-c105b9de-4e0fd3a3 to keyring
D: Using legacy gpg-pubkey(s) from rpmdb
D: Expected size: 531948 = lead(96)+sigs(1284)+pad(4)+data(530564)
D: Actual size: 531948
error: python-myghty-1.1-11.el6.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID c105b9de: BAD
error: python-myghty-1.1-11.el6.noarch.rpm cannot be installed
D: added source package [0]
D: found 1 source and 0 binary packages
D: closed db index /var/lib/rpm/Name
D: closed db index /var/lib/rpm/Packages
D: closed db environment /var/lib/rpm
Thanks again for your reply.
I downloaded the package openldap-2.4.23-20.el6.i686.rpm from the vault and i had to use --signature and --nodigest to overcome the signing problem.
But i got into another problem the dependencies as you can see below:
Quote:
[root@insync tmp]# rpm -ivh --nosignature --nodigest openldap-2.4.23-20.el6.i686.rpm
error: Failed dependencies:
/sbin/ldconfig is needed by openldap-2.4.23-20.el6.i686
libc.so.6 is needed by openldap-2.4.23-20.el6.i686
libc.so.6(GLIBC_2.0) is needed by openldap-2.4.23-20.el6.i686
libc.so.6(GLIBC_2.1) is needed by openldap-2.4.23-20.el6.i686
libc.so.6(GLIBC_2.1.2) is needed by openldap-2.4.23-20.el6.i686
libc.so.6(GLIBC_2.1.3) is needed by openldap-2.4.23-20.el6.i686
libc.so.6(GLIBC_2.12) is needed by openldap-2.4.23-20.el6.i686
libc.so.6(GLIBC_2.3) is needed by openldap-2.4.23-20.el6.i686
libc.so.6(GLIBC_2.3.2) is needed by openldap-2.4.23-20.el6.i686
libc.so.6(GLIBC_2.3.4) is needed by openldap-2.4.23-20.el6.i686
libc.so.6(GLIBC_2.4) is needed by openldap-2.4.23-20.el6.i686
libnspr4.so is needed by openldap-2.4.23-20.el6.i686
libnss3.so is needed by openldap-2.4.23-20.el6.i686
libnss3.so(NSS_3.10) is needed by openldap-2.4.23-20.el6.i686
libnss3.so(NSS_3.11.1) is needed by openldap-2.4.23-20.el6.i686
libnss3.so(NSS_3.12) is needed by openldap-2.4.23-20.el6.i686
libnss3.so(NSS_3.12.5) is needed by openldap-2.4.23-20.el6.i686
libnss3.so(NSS_3.12.9) is needed by openldap-2.4.23-20.el6.i686
libnss3.so(NSS_3.2) is needed by openldap-2.4.23-20.el6.i686
libnss3.so(NSS_3.3) is needed by openldap-2.4.23-20.el6.i686
libnss3.so(NSS_3.4) is needed by openldap-2.4.23-20.el6.i686
libnss3.so(NSS_3.6) is needed by openldap-2.4.23-20.el6.i686
libnss3.so(NSS_3.8) is needed by openldap-2.4.23-20.el6.i686
libnss3.so(NSS_3.9.2) is needed by openldap-2.4.23-20.el6.i686
libnss3.so(NSS_3.9.3) is needed by openldap-2.4.23-20.el6.i686
libnssutil3.so is needed by openldap-2.4.23-20.el6.i686
libplc4.so is needed by openldap-2.4.23-20.el6.i686
libplds4.so is needed by openldap-2.4.23-20.el6.i686
libresolv.so.2 is needed by openldap-2.4.23-20.el6.i686
libresolv.so.2(GLIBC_2.2) is needed by openldap-2.4.23-20.el6.i686
libsasl2.so.2 is needed by openldap-2.4.23-20.el6.i686
libsmime3.so is needed by openldap-2.4.23-20.el6.i686
libssl3.so is needed by openldap-2.4.23-20.el6.i686
libssl3.so(NSS_3.2) is needed by openldap-2.4.23-20.el6.i686
libssl3.so(NSS_3.4) is needed by openldap-2.4.23-20.el6.i686
libssl3.so(NSS_3.7.4) is needed by openldap-2.4.23-20.el6.i686
rtld(GNU_HASH) is needed by openldap-2.4.23-20.el6.i686
Aslo downloaded file-roller and had the same issue:
Quote:
[root@insync tmp]# rpm -ivh --nosignature --nodigest file-roller-2.28.2-6.el6.i686.rpm
error: Failed dependencies:
/bin/sh is needed by file-roller-2.28.2-6.el6.i686
GConf2 is needed by file-roller-2.28.2-6.el6.i686
libatk-1.0.so.0 is needed by file-roller-2.28.2-6.el6.i686
libc.so.6 is needed by file-roller-2.28.2-6.el6.i686
libc.so.6(GLIBC_2.0) is needed by file-roller-2.28.2-6.el6.i686
libc.so.6(GLIBC_2.1) is needed by file-roller-2.28.2-6.el6.i686
libc.so.6(GLIBC_2.1.3) is needed by file-roller-2.28.2-6.el6.i686
libc.so.6(GLIBC_2.2) is needed by file-roller-2.28.2-6.el6.i686
libc.so.6(GLIBC_2.3) is needed by file-roller-2.28.2-6.el6.i686
libc.so.6(GLIBC_2.3.4) is needed by file-roller-2.28.2-6.el6.i686
libc.so.6(GLIBC_2.4) is needed by file-roller-2.28.2-6.el6.i686
libcairo.so.2 is needed by file-roller-2.28.2-6.el6.i686
libfontconfig.so.1 is needed by file-roller-2.28.2-6.el6.i686
libfreetype.so.6 is needed by file-roller-2.28.2-6.el6.i686
libgconf-2.so.4 is needed by file-roller-2.28.2-6.el6.i686
libgdk-x11-2.0.so.0 is needed by file-roller-2.28.2-6.el6.i686
libgdk_pixbuf-2.0.so.0 is needed by file-roller-2.28.2-6.el6.i686
libgio-2.0.so.0 is needed by file-roller-2.28.2-6.el6.i686
libglib-2.0.so.0 is needed by file-roller-2.28.2-6.el6.i686
libgmodule-2.0.so.0 is needed by file-roller-2.28.2-6.el6.i686
libgobject-2.0.so.0 is needed by file-roller-2.28.2-6.el6.i686
libgthread-2.0.so.0 is needed by file-roller-2.28.2-6.el6.i686
libgtk-x11-2.0.so.0 is needed by file-roller-2.28.2-6.el6.i686
libm.so.6 is needed by file-roller-2.28.2-6.el6.i686
libm.so.6(GLIBC_2.0) is needed by file-roller-2.28.2-6.el6.i686
libnautilus-extension.so.1 is needed by file-roller-2.28.2-6.el6.i686
libpango-1.0.so.0 is needed by file-roller-2.28.2-6.el6.i686
libpangocairo-1.0.so.0 is needed by file-roller-2.28.2-6.el6.i686
libpangoft2-1.0.so.0 is needed by file-roller-2.28.2-6.el6.i686
libpthread.so.0 is needed by file-roller-2.28.2-6.el6.i686
libpthread.so.0(GLIBC_2.0) is needed by file-roller-2.28.2-6.el6.i686
librt.so.1 is needed by file-roller-2.28.2-6.el6.i686
rtld(GNU_HASH) is needed by file-roller-2.28.2-6.el6.i686
scrollkeeper is needed by file-roller-2.28.2-6.el6.i686
Now the weird thing is that the files it is complaining about DO exist but it seem like RPM is not able to see them.
which checks all files against the rpm db.
It'll tell you how bad the problem is I guess.
The first 2 or 3 items in each problem list are pretty fundamental files. If it can't them them you're pretty stuffed...
Is the system still doing its normal job ie is it just yum/rpm that can't see those files, or do normal operations also have the same problem?
Have you checked the perms & ownerships against a known good system?
The rpm cmd above should tell you a lot.
If you do need to fix perms/ownerships, see this http://www.cyberciti.biz/tips/reset-...ermission.html
Thanks for your reply.
rpm -Va doesn't return anything.
Code:
[root@insync tmp]# rpm -Va
[root@insync tmp]#
The server is operating normally besides rpm/yum, it runs a backup application and its still running fine. I found out about the problem when i wanted to install sendmail via yum and it gave me the initial error, then tried to use rpm and it wasn't working either.
I tried rebuilding and reinitiating the rpm database with no luck.
Also i seem to have a signature/Hash problem as any package i download fail...
Seems like rpm and yum don't know where the location of the file they need to run...
Hmm; I take it you didn't interrupt that cmd? Normally it'll flag at least a few files due to custom edits etc.
If it thinks ALL files are fine, but can't actually install/update anything, that's REALLY weird.
What about my qn re perms/ownerships; any way to check; did you read that link, it may help?
Theoretically anything is fixable, but I'd at least start thinking about forcing an OS upgrade to 6.3.
I hope it can backup itself...
Speaking of which, check a very recent backup ie since the problem started; they may or may not be valid...
I googled a little and tried rebuilding and initiating the rpm database i stil got the same result.
there are two different instructions for that
one ( and i think you did this )
has you run "rm" on the rpm database file -- i never liked that
------------
cd /var/lib
rm __db*
-------------
my normal is ( using yum also )
Code:
su -
yum clean all
rpm --rebuilddb
yum update
if so there is no database to read
what happens if you run this
Code:
su -
rpm --rebuilddb
in an emergency ( and the procedure MIGHT kill the install so.....)
and you need to reboot
Warning:
manually extract the files in the rpm ( do not install ) use file-roller in gnome to extract the rpm ( it is a cpio format )
the cipo terminal program can be used but the rpm is also zipped
see: " cipo --help "
then in the NEW folders in the folder you extracted it in, the
/etc
/lib
/usr
folders have the files
BUT THE 100% MUST BE THE EXACT 100% THE EXACT same versions that ARE INSTALLED
that rpm MUST be the one that was installed to begin with
then copy /paste the lib ( and it's sim links )in where it belongs
but this might kill the install if it is a mismatch
Please install a package which provides this module, or
verify that the module is installed correctly.
It's possible that the above module doesn't match the
current version of Python, which is:
2.6.6 (r266:84292, Dec 7 2011, 20:38:36)
[GCC 4.4.6 20110731 (Red Hat 4.4.6-3)]
[root@insync tmp]# su -
[root@insync ~]# rpm --rebuilddb
[root@insync ~]# yum clean all
There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:
Please install a package which provides this module, or
verify that the module is installed correctly.
It's possible that the above module doesn't match the
current version of Python, which is:
2.6.6 (r266:84292, Dec 7 2011, 20:38:36)
[GCC 4.4.6 20110731 (Red Hat 4.4.6-3)]
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.