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.

CentOS cPanel ISO - yum update errors

Discussion in 'General Discussion' started by envisage, Oct 1, 2014.

  1. envisage

    envisage Member

    Joined:
    Oct 1, 2014
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hi All,

    I have deployed the cPanel-CentOS-6.4-x86_64.iso on a brand new VMware virtual machine located in a data centre, all is running well except for the fact that any yum command (including yum update) is throwing up the error below. Have tried to search and have done all sorts of reading for this but can't seem to get to the bottom of it.

    Output is below, can anybody help with this please? From my reading it seems to be some sort of python error, but any solution I can find involves using yum to reinstall python modules which it won't let me do!

    Code:
    root@vps [~]# yum update
    Traceback (most recent call last):
      File "/usr/bin/yum", line 29, in <module>
        yummain.user_main(sys.argv[1:], exit_code=True)
      File "/usr/share/yum-cli/yummain.py", line 285, in user_main
        errcode = main(args)
      File "/usr/share/yum-cli/yummain.py", line 105, in main
        base.getOptionsConfig(args)
      File "/usr/share/yum-cli/cli.py", line 228, in getOptionsConfig
        self.conf
      File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 891, in <lambda>
        conf = property(fget=lambda self: self._getConfig(),
      File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 299, in _getConfig
        startupconf = config.readStartupConfig(fn, root)
      File "/usr/lib/python2.6/site-packages/yum/config.py", line 885, in readStartupConfig
        startupconf.releasever = _getsysver(startupconf.installroot, startupconf.distroverpkg)
      File "/usr/lib/python2.6/site-packages/yum/config.py", line 1036, in _getsysver
        hdr = idx.next()
    StopIteration
    root@vps [~]#
    Anyone have any ideas?
     
    #1 envisage, Oct 1, 2014
    Last edited by a moderator: Oct 1, 2014
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    654
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    It's possible your server does not have enough memory to support the "yum update" command. Try editing the /etc/yum/pluginconf.d/fastestmirror.conf file and change "enable=1" to "enable=0" to see if that makes a difference. Note the memory requirements for cPanel are listed here:

    Hardware Requirements

    Thank you.
     
  3. envisage

    envisage Member

    Joined:
    Oct 1, 2014
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hi cPanelMichael, thanks for your quick reply.

    I came across this solution on another thread but unfortunately did not work for me. This server has 12GB memory and plenty of HDD space. Could there be anything else? Below is a snippet of my "top" output for memory:

    Mem: 12197804k total, 909404k used, 11288400k free, 49248k buffers
    Swap: 6168572k total, 0k used, 6168572k free, 425984k cached

    Thanks again
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    654
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    You could try reinstalling Python, but since this is a fresh installation, you may simply want to try reinstalling CentOS 6 on it's own and then installing cPanel separately.

    Thank you.
     
  5. envisage

    envisage Member

    Joined:
    Oct 1, 2014
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Thanks cPanelMichael, what would be the commands to reinstall Python without using yum?

    I have been reading this thread, and believe this will help but am unsure how to translate the solution into CentOS 6 and x86_64
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    654
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    You could try "yum reinstall python", but reinstalling the OS is likely the best way to go. The error indicates the initial installation may not have completed successfully.

    Thank you.
     
  7. envisage

    envisage Member

    Joined:
    Oct 1, 2014
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Thanks, unfortunately reinstalling the OS isn't an option so will work on trying to reinstall python using rpm since any yum command gives the same error.

    The info in this thread (yum-updatesd issue - cPanel Forums) seems applicable to me, just need to find the x86_64 Centos 6 versions of these packages
     
  8. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    654
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
  9. envisage

    envisage Member

    Joined:
    Oct 1, 2014
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Just a followup for anyone else with the same issue, with the help of cPanel support we ended up finding the problem.

    It turned out to be a corrupt RPM database, as all the needed rpm packages were actually already installed but not recognised.

    The following command rebuilt the RPM database and yum started functioning properly afterwards:

    for i in `find /var/lib/rpm/ -type f -name __db.00*`; do mv -v $i $i.old; done db_verify /var/lib/rpm/Packages rpm -v --rebuilddb yum clean all
     
  10. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

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

Share This Page