LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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 01-12-2013, 10:05 AM   #1
WassimZ
LQ Newbie
 
Registered: Jan 2013
Posts: 8

Rep: Reputation: Disabled
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.
 
Old 01-12-2013, 02:11 PM   #2
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,627

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
you are aware that 6.2 is not supported any longer
and that the centos "update" repo was moved to the historical "vault"

CentOS is currently only supporting 6.3 and the much older and current 5.8


it is recommended to upgrade
but yum is normally used

depending and that is a VERY big depending

depending on just when you last ran
Code:
su -
yum update
you might have the very last updates installed
if so

you can try a force reinstall of that from the historical vault

but before you try you must make 100% sure that the last update is what you have installed

run this
Code:
su -
rpm -qa | grep python 
rpm -qa | grep python-ldap
You are running a 32 bit OS ( the "/lib/libldap" part )
http://vault.centos.org/6.2/updates/i386/Packages/

python-2.6.6-29.el6_2.2.i686.rpm
and ldap is in
http://vault.centos.org/6.2/os/i386/Packages/
python-ldap-2.3.10-1.el6.i686.rpm

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:

http://www.centos.org/modules/smartfaq/faq.php?faqid=34

If you know what you are doing, and absolutely want to remain at the 6.2
level, go to http://vault.centos.org/ for packages.

Please keep in mind that 6.0, 6.1 and 6.2 no longer gets any updates, nor
any security fix's.
 
1 members found this post helpful.
Old 01-12-2013, 03:22 PM   #3
WassimZ
LQ Newbie
 
Registered: Jan 2013
Posts: 8

Original Poster
Rep: Reputation: Disabled
Hello John,

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:

Code:
[root@insync ~]# rpm -qa 
gpg-pubkey-c105b9de-4e0fd3a3
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
I hope it's not unrepairable, what do you think?
 
Old 01-12-2013, 04:35 PM   #4
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,627

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
?"openldap-ltb-2.4.33-1.el6.i686.rpm "

that is not the one in the 6.2 vault , nor the 6.3 os repo

so you had installed openldap

that "key" error is you do not have the security key to check it

also from where did you get that rpm ?
the version in the centos 6.2 vault is "openldap-2.4.23-20.el6.i686.rpm"

if that different version IS what was installed
then you might want to read the rpm man page and the help page
Code:
su -
rpm --help
--- and ---
man rpm
you do not need to be root to read the two but you will need to be to install something

and use the "--nosignature" option
that dose not check if that rpm's security signature matches the the one on file on your computer

but the file you are trying to force install MUSTbe the exact same that was installed



if that dose not work you "can" ( last resort )
copy/paste the "libldap-2.4.so.2" after you extract it from the rpm

file-roller will extract the rpm format archive
you will get ( in the same folder )
a /lib folder

but you must be root to copy/paste it into /lib

Last edited by John VV; 01-12-2013 at 04:52 PM.
 
2 members found this post helpful.
Old 01-13-2013, 07:21 AM   #5
WassimZ
LQ Newbie
 
Registered: Jan 2013
Posts: 8

Original Poster
Rep: Reputation: Disabled
Hello John,

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.

What do you think?
 
Old 01-13-2013, 07:51 AM   #6
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
# 5
Quote:
What do you think ?
Just guessing : Your OS is 64bits. Hence the missing 32bits packages.
I.e. use "x86_64" packages instead.

Verifying the architecture : $ uname -a
 
Old 01-13-2013, 07:59 AM   #7
WassimZ
LQ Newbie
 
Registered: Jan 2013
Posts: 8

Original Poster
Rep: Reputation: Disabled
Hi Knudfl,

Quote:
[root@insync tmp]# uname -a
Linux 2.6.32-220.17.1.el6.i686 #1 SMP Tue May 15 22:09:39 BST 2012 i686 i686 i386 GNU/Linux
That's a 32-bit right?
 
Old 01-14-2013, 12:55 AM   #8
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,360

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
That's 32bit alright ... you can try
Code:
rpm -Va
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
 
1 members found this post helpful.
Old 01-14-2013, 01:17 AM   #9
WassimZ
LQ Newbie
 
Registered: Jan 2013
Posts: 8

Original Poster
Rep: Reputation: Disabled
Hello Chris,

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...
 
Old 01-14-2013, 01:34 AM   #10
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,360

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
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...

Anything interesting in /var/log/yum.log?
 
Old 01-14-2013, 01:39 AM   #11
WassimZ
LQ Newbie
 
Registered: Jan 2013
Posts: 8

Original Poster
Rep: Reputation: Disabled
Well i can't use rpm in any way since the simplest is rpm -qa that i supposed to list the packages and it returns:

Quote:
[root@insync tmp]# rpm -qa
gpg-pubkey-c105b9de-4e0fd3a3
What do you think about using fsck?

How can i force an upgrade to 6.3 when i can't use yum or rpm?

Unfortunately i don't have system backup.

Thanks,
Wassim.
 
Old 01-14-2013, 02:56 AM   #12
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,627

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
Quote:
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

then reboot
cross your fingers

Last edited by John VV; 01-14-2013 at 02:59 AM.
 
1 members found this post helpful.
Old 01-14-2013, 05:36 AM   #13
WassimZ
LQ Newbie
 
Registered: Jan 2013
Posts: 8

Original Poster
Rep: Reputation: Disabled
Hello John,

Yum is not working so when i issue yum clean all i get:

Quote:
[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:

/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
if i rebuild nothing happens:

Quote:
[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:

/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

What packages need replacement? rpm and yum and python?
 
Old 01-14-2013, 01:36 PM   #14
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,627

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
/lib/libldap-2.4.so.2: undefined symbol: ber_sockbuf_io_udp
 
  


Reply



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
Ubuntu 9.10 - Error importing python modules - $PYTHONPATH? km0r3 Linux - Software 4 12-06-2009 09:18 PM
swig 13.3.39, ubuntu 8.10, problem with importing C program to python plugo Linux - Software 3 08-11-2009 01:26 AM
swig 13.3.39, ubuntu 8.10, problem with importing C program to python plugo Linux - Software 1 08-09-2009 09:39 PM
Problems with Python, CentOS and Yum Hamidof Linux - Software 1 04-03-2009 01:22 PM
Problem importing python module...cant install anything!!! bpedman Linux - Software 0 02-07-2007 08:02 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:50 PM.

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
Open Source Consulting | Domain Registration