Skip to content

yum: error: no dbpath has been set on Centos VPS

Seu erro parece com:

[ root@nomedoserver]# yum clean all
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


yum clean all
rm -f /var/lib/rpm/__db*
rpm –rebuilddb
yum update

Se persistir:

rm /dev/urandom
mknod -m 644 /dev/urandom c 1 9

Caso não resolva pare a vps
mknod –mode 644 /vz/private/100/lib/udev/devices/urandom c 1 9
start VPS

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.