OpenVZ Forum


Home » General » Support » yum troubles on centos 5 x86_64
yum troubles on centos 5 x86_64 [message #21490] Tue, 09 October 2007 21:16 Go to next message
sub0 is currently offline  sub0
Messages: 1
Registered: October 2007
Junior Member
hello,

i'm having yum troubles... platform is centOS 5 x86_64 with Centos 4.4 VEs (based on the default templates)

two different problems:

1. i installed yum into a VE using vzyum, but when running yum from within the VE i get:

[root@boinc06 ~]# yum install joe

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


any ideas about what's going on?

...second problem is:


2. after running vzmigrate --online vzyum fails on the new node. it also keeps failing if i move it back to the original node:

[root@joycamp ~]# vzyum 202 install joe
exec /usr/bin/yum -c /vz/template/centos/4/x86_64/config/yum.conf --installroot /vz/root/202 install joe
rpmdb: Program version 4.3 doesn't match environment version
error: db4 error(-30974) from dbenv->open: DB_VERSION_MISMATCH: Database environment version mismatch
error: cannot open Packages index using db3 - (-30974)
error: cannot open Packages database in /vz/root/202/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 82, in main
base.getOptionsConfig(args)
File "/usr/share/yum-cli/cli.py", line 206, in getOptionsConfig
errorlevel=opts.errorlevel)
File "/usr/lib/python2.4/site-packages/yum/__init__.py", line 132, in doConfigSetup
self.conf = config.readMainConfig(startupconf)
File "/usr/lib/python2.4/site-packages/yum/config.py", line 598, in readMainConfig
yumvars['releasever'] = _getsysver(startupconf.installroot, startupconf.distroverpkg)
File "/usr/lib/python2.4/site-packages/yum/config.py", line 661, in _getsysver
idx = ts.dbMatch('provides', distroverpkg)
TypeError: rpmdb open failed


the output is for two different VEs.

Re: yum troubles on centos 5 x86_64 [message #21551 is a reply to message #21490] Wed, 10 October 2007 20:13 Go to previous messageGo to next message
dowdle is currently offline  dowdle
Messages: 261
Registered: December 2005
Location: Bozeman, Montana
Senior Member
I'd say the show stopper is that you don't have an rpm database as witnessed by:

error: cannot open Packages database in /var/lib/rpm

Why is that?

Try this on the problem VPS:

rm -f /var/lib/rpm/__db*; rpm --rebuilddb


--
TYL, Scott Dowdle
Belgrade, Montana, USA
Re: yum troubles on centos 5 x86_64 [message #21653 is a reply to message #21551] Fri, 12 October 2007 16:29 Go to previous messageGo to next message
dranch is currently offline  dranch
Messages: 33
Registered: August 2007
Member
I just saw this problem yesterday. In addition to rebuilding the RPM database, I needed to re-run yum in the VPS, say "yum update" and after that, vzyum would work fine.

What's interesting is that in the posted centos5 minimal and default templates, the various /vz/template/centos/5/i386/config
pre and post scripts make mention of this though they are commented out. I think they should be brought back with the addition of a yum pass.

--David
Re: yum troubles on centos 5 x86_64 [message #21655 is a reply to message #21653] Fri, 12 October 2007 17:05 Go to previous message
dowdle is currently offline  dowdle
Messages: 261
Registered: December 2005
Location: Bozeman, Montana
Senior Member
I don't have any x86_64 VEs and I haven't run into this problem. Do you think this is specific to x86_64? Are your VE's x86_64 or i386?

I have run some CentOS 4 VEs on CentOS 4, some CentOS 4 VEs on CentOS 5, and some CentOS 5 VEs on CentOS 5. Mostly i386 but I now have a hn that has CentOS 5 x86_64... and I haven't run into this problem... but it is possible that I haven't created any new VEs on the x86_64 system... as I think I've migrated the VEs to it from other machines.

Give me a better run down of the specifics of your situation and I'll see if I can duplicate it.


--
TYL, Scott Dowdle
Belgrade, Montana, USA
Previous Topic: Missing Crontab pkg for Ubuntu OS template.
Next Topic: Understanding CPU Units
Goto Forum:
  


Current Time: Mon Nov 04 07:10:46 GMT 2024

Total time taken to generate the page: 0.03488 seconds