YUM problem in Centos 5.3

Tags: centOSfastestmirrorurandomyum

Published on: June 6, 2009 by Vijesh Vijayan

YUM problem in Centos 5.3


This is a rare issue found in certain VPSes purchased as a part of our VPS hosting support recently. There will be no problem within the system but yum will refuse to function properly. No installations or updations will be possible with yum. All you get to see is a collection of error statements in the shell (upon running the yum command):

Loaded plugins: fastestmirror
error: no dbpath has been set
error: cannot open Packages database in /%{_dbpath}
Traceback (most recent call last):
File “/usr/bin/yum”, line 29, in ?
yummain.user_main(sys.argv[1:], exit_code=True)
File “/usr/share/yum-cli/”, line 229, in user_main
errcode = main(args)
File “/usr/share/yum-cli/”, line 84, in main
File “/usr/share/yum-cli/”, line 184, in getOptionsConfig
File “/usr/lib/python2.4/site-packages/yum/”, line 191, in _getConfig
self._conf = config.readMainConfig(startupconf)
File “/usr/lib/python2.4/site-packages/yum/”, line 754, in readMainConfig
yumvars[‘releasever’] = _getsysver(startupconf.installroot, startupconf.distroverpkg)
File “/usr/lib/python2.4/site-packages/yum/”, line 824, in _getsysver
idx = ts.dbMatch(‘provides’, distroverpkg)
TypeError: rpmdb open failed

At the same time rpm is also not found to be working for any of the users reporting this issue. ‘rpm’ simply will not install any rpm packaged file. It will exit with no result.

To solve the issue execute the following commands as root:

#rm /dev/urandom
#mknod -m 644 /dev/urandom c 1 9
#yum clean all
#yum update all

Category : cPanel, Linux, Snippets, Troubleshooting, VPS

Vijesh Vijayan

Vijesh Vijayan

Vijesh is quite enthusiastic in learning new technologies and enjoys sharing it with others. He has great command over various scripting languages like bash, perl, python and is keen in developing scripts for better productivity. He is a gifted singer and amuses the team with his mimicry skills, when there is a leisure moment.

You may also read:


Add new commentSIGN IN

Let's Connect

Get new updates


$0.000 items