YUM update issues

Issues related to software problems
Post Reply
nepsis
Posts: 3
Joined: 2009/04/30 10:51:43
Location: Scotland

YUM update issues

Post by nepsis » 2009/04/30 11:03:31

Ok seeing an interesting issue when trying to simply run a:
[code]
[root@mymachine ~]# yum update
rpmdb: Program version 4.2 doesn't match environment version
error: db4 error(22) from dbenv->open: Invalid argument
error: cannot open Packages index using db3 - Invalid argument (22)
error: cannot open Packages database in /var/lib/rpm
Traceback (most recent call last):
File "/usr/bin/yum", line 29, in ?
yummain.main(sys.argv[1:])
File "/usr/share/yum-cli/yummain.py", line 80, in main
base.getOptionsConfig(args)
File "/usr/share/yum-cli/cli.py", line 170, in getOptionsConfig
self.doConfigSetup(fn=opts.conffile, root=root)
File "__init__.py", line 82, in doConfigSetup
File "config.py", line 273, in __init__
File "config.py", line 385, in _getsysver
TypeError: rpmdb open failed
[/code]

So I have done a bit of searching and I see people have suggested rebuilding the __db* files in /var/lib/rpm by doing a:

[code]
rm -f /var/lib/rpm/__db*
rpm --rebuilddb
[/code]

After this is done it does remove the error but yum goes into a processing dependency loop:

[code]
--> Processing Dependency: libc.so.6(GLIBC_2.1.3) for package: openmotif21
--> Processing Dependency: libc.so.6(GLIBC_2.0) for package: openmotif-devel
--> Processing Dependency: libc.so.6(GLIBC_2.2) for package: openmotif
--> Processing Dependency: libc.so.6 for package: zlib
--> Processing Dependency: libc.so.6(GLIBC_2.1) for package: qt
--> Processing Dependency: libdl.so.2(GLIBC_2.0) for package: xorg-x11-Mesa-libGL
[/code]

And these messages continue on forever. So... any ideas?

pschaff
Retired Moderator
Posts: 18276
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America
Contact:

Re: YUM update issues

Post by pschaff » 2009/04/30 13:56:42

What version did you start with? Was yum working before? Have you change anything in /etc/yum.repos.d including editing files or adding 3rd party repos? Using any yum plugins? Have you tried "yum clean all"?
Might provide the output of
[code]
uname -a
cat /etc/redhat-release
ls /etc/yum.repos.d
[/code]
for a start.

Need more information to have a clue what else to recommend. Please make sure you have done the "Required reading".

Welcome to the CentOS fora.

nepsis
Posts: 3
Joined: 2009/04/30 10:51:43
Location: Scotland

Re: YUM update issues

Post by nepsis » 2009/04/30 14:40:28

Hey thanks for the reply.

Yea Yum was defiantly working two weeks ago. Nothing has changed in the repos and not using any plugins. And yea I have tried a 'yum clean all' with no success.

Here's the machine info:
[code]
Linux mymachine 2.6.9-78.0.13.ELsmp #1 SMP Wed Jan 14 15:55:36 EST 2009 x86_64 x86_64 x86_64 GNU/Linux
CentOS release 4.7 (Final)
adobe-linux-i386.repo CentOS-Base.repo CentOS-Media.repo epel.repo epel-testing.repo
[/code]

On a bit of investigation whenever I run a 'file /sbin/ifconfig' I get:
[code]
file: error while loading shared libraries: /usr/lib64/libc.so.6: invalid ELF header
[/code]

The only thing that springs to mind is that the machine was rebooted a couple of weeks ago, as sometimes machines should be. Guess it's possible there were library updates which aren't reacting too well with everything.

pschaff
Retired Moderator
Posts: 18276
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America
Contact:

Re: YUM update issues

Post by pschaff » 2009/04/30 20:54:11

I googled your error and came up with a Fedora user with similar symptoms who had killed the system doing "ln -s /usr/lib64/libc.so /usr/lib64/libc.so.6", The advice there was to boot to rescue mode, remove the link, chroot to the installed image, and reinstall relevant packages - unspecified. As /usr/lib64/libc.so belongs to glibc-devel you might try forcing a reinstall of that and possibly glibc - dangerous stuff.

Good luck!

nepsis
Posts: 3
Joined: 2009/04/30 10:51:43
Location: Scotland

Re: YUM update issues

Post by nepsis » 2009/06/19 09:40:28

So just in case anyone is interested. Or anyone stumbles upon this thread and wants to know what happened. I know it's been ages since I asked about this but I've been pretty busy lately.

I tried to reinstall glibc-devel on the system but it kept giving dependency errors. The dependencies it was looking for were the ones actually installed on the system so I am not sure what was going on there.

As a work around and to be fair, something I should have noticed at the start, was the yum loop it was getting into was while it tried to process dependencies for Libpng.

So by adding the following into /etc/yum.conf:

[code]exclude=libpng*[/code]

I was able to miss out the dependency loop and update the system.

Of course this still means at the moment I can not update libpng but thankfully not essential for me right now!

:-)

Post Reply

Return to “CentOS 4 - Software Support”