MAY

14

Fri

Author:EMINARCISSUS

被拍砖0次,接着砸!

This server the problem occurred on is running CentOS 5.3 with Kloxo/LxAdmin, (VPS) none of the yum commands work without getting an error

yum update -y

Code:

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/yummain.py", line 229, in user_main

errcode = main(args)

File "/usr/share/yum-cli/yummain.py", line 84, in main

base.getOptionsConfig(args)

File "/usr/share/yum-cli/cli.py", line 184, in getOptionsConfig

enabled_plugins=self.optparser._splitArg(opts.enableplugins))

File "/usr/lib/python2.4/site-packages/yum/__init__.py", line 191, in _getConfig

self._conf = config.readMainConfig(startupconf)

File "/usr/lib/python2.4/site-packages/yum/config.py", line 754, in readMainConfig

yumvars['releasever'] = _getsysver(startupconf.installroot, startupconf.distroverpkg)

File "/usr/lib/python2.4/site-packages/yum/config.py", line 824, in _getsysver

idx = ts.dbMatch('provides', distroverpkg)

TypeError: rpmdb open failed

To fix this problem simply run the commands below

Code:

rm /dev/urandom

mknod -m 644 /dev/urandom c 1 9

This is a temporary solution, but I will fix it untill the VPS is restarted.

This server the problem occurred on is running CentOS 5.3 with Kloxo/LxAdmin, (VPS) none of the yum commands work without getting an error yum update -yCode:Loaded plugins: fastestmirrorerror: no dbpath has been seterror: 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/yummain.py", line 229, in user_main    errcode = main(args)  File "/usr/share/yum-cli/yummain.py", line 84, in main    base.getOptionsConfig(args)  File "/usr/share/yum-cli/cli.py", line 184, in getOptionsConfig    enabled_plugins=self.optparser._splitArg(opts.enableplugins))  File "/usr/lib/python2.4/site-packages/yum/init.py", line 191, in getConfig    self.conf = config.readMainConfig(startupconf)  File "/usr/lib/python2.4/site-packages/yum/config.py", line 754, in readMainConfig    yumvars['releasever'] = getsysver(startupconf.installroot, startupconf.distroverpkg)  File "/usr/lib/python2.4/site-packages/yum/config.py", line 824, in getsysver    idx = ts.dbMatch('provides', distroverpkg)TypeError: rpmdb open failedTo fix this problem simply run the commands below Code:rm /dev/urandommknod -m 644 /dev/urandom c 1 9

This is a temporary solution, but I will fix it untill the VPS is restarted.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/yummain.py", line 229, in user_main
    errcode = main(args)
  File "/usr/share/yum-cli/yummain.py", line 84, in main
    base.getOptionsConfig(args)
  File "/usr/share/yum-cli/cli.py", line 184, in getOptionsConfig
    enabled_plugins=self.optparser._splitArg(opts.enableplugins))
  File "/usr/lib/python2.4/site-packages/yum/<strong>init</strong>.py", line 191, in getConfig
    self.conf = config.readMainConfig(startupconf)
  File "/usr/lib/python2.4/site-packages/yum/config.py", line 754, in readMainConfig
    yumvars['releasever'] = getsysver(startupconf.installroot, startupconf.distroverpkg)
  File "/usr/lib/python2.4/site-packages/yum/config.py", line 824, in getsysver
    idx = ts.dbMatch('provides', distroverpkg)
TypeError: rpmdb open failed

 

smiley