yum error not working rpmdb: mmap: No such device TypeError: rpmdb open failed

Loaded plugins: fastestmirror
rpmdb: mmap: No such device
error: db4 error(19) from dbenv->open: No such device
error: cannot open Packages index using db3 - No such device (19)
error: cannot open Packages database in /var/lib/rpm
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

 

I tried running the rpm rebuilddb but it won't work:

 

rpm --rebuilddb
rpmdb: mmap: No such device
error: db4 error(19) from dbenv->open: No such device
error: cannot open Packages index using db3 - No such device (19)

Latest Articles

  • Openvz Quick Install for CentOS 5 Tutorial
  • Subnet Mask Lengths / Quick Reference
  • Linux How To Add/Delete A Default Route/Gateway
  • DRBD WFConnection Problem/Solution
  • How not to change an IP address in CPanel during a migration
  • CPanel Cannot Login Internal Server Error Could not fetch uid or gid for : root https://192.168.1.42:2083
  • sed script to automatically update IPs in named/BIND and httpd/Apache
  • mdadm Linux Software RAID QuickStart Guide
  • HeartBeat Error/High Load heartbeat: [7120]: WARN: Gmain_timeout_dispatch: Dispatch function for retransmit request took too long to execute: 20 ms (> 10 ms) (GSource: 0x926b390)
  • VirtualBox Error Failed to start the virtual machine Centos 5.5 Mirror. Medium '/home/testuser/.VirtualBox/HardDisks/Centos 5.5 Mirror.vdi' is not accessible. UUID {a1a9fad7-0402-4867-b8f3-39fb49454bc5} of the medium '/home/testuser/.VirtualBox/HardD
  • Installing Virtualbox on Centos 5.5
  • Openvz Live Migration Error - Error: undump failed: Invalid argument Restoring failed: Error: iptables-restore exited with 2 Error: Most probably some iptables modules are not loaded Error: rst_restore_net: -22
  • OpenOffice Writer Default Paragraph Annoyance
  • DirectAdmin Install Webalizer Stats
  • Ubuntu Linux HTML Rendering left bracket < problem appears as 003C box
  • Solution - error while loading shared libraries: libgd.so.2: cannot open shared object file: No such file or directory
  • Linux Kernel Boot Black Screen of Death Freeze/Halt Solution
  • Linux Kernel Freeze/Hang during boot on io scheduler cfq registered (default)
  • VirtualBox/VBOX Centos 5.5 Installation Kernel Freeze Problem "NET: Registered protocol family 2" And Solution
  • VirtualBox OSE/VBOX Can't Access Shared Folder Solution