The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Corrupted RPM

Discussion in 'General Discussion' started by pauloray, Mar 8, 2012.

  1. pauloray

    pauloray Well-Known Member

    Joined:
    Jan 16, 2012
    Messages:
    72
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Philippines
    cPanel Access Level:
    Root Administrator
    Hi,

    I got an email saying
    "An automatic check on (hostname) found the RPM database to be corrupted. An attempt was made to automatically fix the database but it was not successful. Please resolve this problem on your system. A backup of the original state of the RPM database directory can be found at /var/lib/rpm.rebuild.backup*"

    I want to try this commands:
    Code:
    mkdir /root/old_rpm_dbs/
    mv /var/lib/rpm/__db* /root/old_rpm_dbs/
    rpm --rebuilddb
    But when running the second line, it gives an error below and I cannot continue:
    Code:
    mv: cannot stat `/var/lib/rpm/__db*': No such file or directory

    How can I fix this?
     
  2. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,449
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    You should be able to look in that directory to see if these files actually exist and move then out of the way if found.

    I just looked on one of my servers and find 3 files starting with __db
     
  3. pauloray

    pauloray Well-Known Member

    Joined:
    Jan 16, 2012
    Messages:
    72
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Philippines
    cPanel Access Level:
    Root Administrator
    Hi, on mine, it has no files that starts with __db under /var/lib/rpm.

    So, that has caused that error.

    How can I rebuild RPM?


    Also, under WHM>Software>Install a RPM> this is empty now.
     
    #3 pauloray, Mar 8, 2012
    Last edited: Mar 8, 2012
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    653
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
  5. pauloray

    pauloray Well-Known Member

    Joined:
    Jan 16, 2012
    Messages:
    72
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Philippines
    cPanel Access Level:
    Root Administrator
    Hi, nothing happens after running the code

    # rpm --rebuilddb

    When I use WHM to Rebuild RPM, it will just say Complete are just 1 second. but the RPM list under Install a RPM is empty.

    I do not know what happened. That was not empty before.

    Please help.
     
  6. pauloray

    pauloray Well-Known Member

    Joined:
    Jan 16, 2012
    Messages:
    72
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Philippines
    cPanel Access Level:
    Root Administrator
    I also tried to run this - # /scripts/rpmup, and it give me this error:

    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 309, in user_main
    errcode = main(args)
    File "/usr/share/yum-cli/yummain.py", line 157, in main
    base.getOptionsConfig(args)
    File "/usr/share/yum-cli/cli.py", line 187, in getOptionsConfig
    self.conf
    File "/usr/lib/python2.4/site-packages/yum/__init__.py", line 665, in <lambda>
    conf = property(fget=lambda self: self._getConfig(),
    File "/usr/lib/python2.4/site-packages/yum/__init__.py", line 240, in _getConfig
    self._conf = config.readMainConfig(startupconf)
    File "/usr/lib/python2.4/site-packages/yum/config.py", line 804, in readMainConfig
    yumvars['releasever'] = _getsysver(startupconf.installroot, startupconf.distroverpkg)
    File "/usr/lib/python2.4/site-packages/yum/config.py", line 877, in _getsysver
    idx = ts.dbMatch('provides', distroverpkg)
    TypeError: rpmdb open failed

    I do not know what does this means, Please help.
     
  7. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,449
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    You might want to open a ticket to cPanel Support. In your WHM, top right corner of any page, click the Support link to find a menu, on it click Contact cPanel.
     
  8. pauloray

    pauloray Well-Known Member

    Joined:
    Jan 16, 2012
    Messages:
    72
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Philippines
    cPanel Access Level:
    Root Administrator
    I submitted a Ticket -Your Request id is: 2389547. Hope this will be fixed. I do not know what happened, but I just noticed that Install a RPM is empty in WHM.
     
  9. pauloray

    pauloray Well-Known Member

    Joined:
    Jan 16, 2012
    Messages:
    72
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Philippines
    cPanel Access Level:
    Root Administrator
Loading...

Share This Page