Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Managing Yum in cPanel

Discussion in 'Workarounds and Optimization' started by cPanelJesse, Nov 20, 2014.

  1. cPanelJesse

    cPanelJesse Director of Technical Support Staff Member

    Sep 19, 2007
    Likes Received:
    Trophy Points:
    cPanel Access Level:
    Root Administrator
    “Yum is an automatic updater and package installer/remover for rpm systems. It automatically computes dependencies and figures out what things should occur to install packages. It makes it easier to maintain groups of machines without having to manually update each one using rpm. Yum has a plugin interface for adding simple features. Yum can also be used from other python programs via its module interface.” Source: yum - Trac

    If you are seeking for specifics on how yum works in general, and perhaps are switching from a system that utilized apt-get or ports, I would recommend reading over Yum (Yellowdog Updater, Modified) HOWTO: Introduction as it contains extremely useful information on how it works and the core mechanics of it.

    The reason for the creation of this blog post is due to the amount of reliance cPanel/WHM has on yum overall. Additionally, cPanel/WHM is actively moving toward being and RPM-based distribution. The end goal of this blog post is to help getting a basic understanding of managing yum and it’s packages (rpm) in the capacity that cPanel/WHM utilizes it.

    The most common yum-cPanel related commands are:

    The most common yum-cPanel related files are:

    The cPanel technical support team can help resolve a myriad of yum-related issues, however, to note specific instances where the scope of our support ends, we are usually hands-off with issues such as:

    • dependencies or issues revolving around Python
    • dependencies or issues revolving around OpenSSL
    • dependencies related to architecture (32->64) changes

    This is because issues related to these types of software or architecture changes could be potentially disastrous if not handled appropriately by a server administrator and are not provided or maintained by cPanel.

    The most commonly supported issues are usually related to issues with the yum repositories. Many customers and providers install 3rd party repositories which can sometimes cause conflicting packages. Simply disabling the additional repositories temporarily can usually resolve a number of issues, and this can be done in a few methods:

    1. You can move all of the additional repositories from /etc/yum.repos.d into a different folder and then proceed with your yum-related command

    2. You can use the yum command which excludes/disables additional repositories:
    yum --disablerepo=* --enablerepo=base update
    so that only the base and update repos are enabled.

    Common Issues

    [B]Error: Cannot find a valid baseurl for repo: base[/B]
    This is a very common issue we see in tickets and the solution to resolving it is rather simple. This usually indicates that the repository you are using for ‘base’ in /etc/yum.repos.d/CentOS-Base.repo is invalid or perhaps even commented out. To fix this, simply modify the file:
    vi /etc/yum.repos.d/CentOS-Base.repo
    then search for the following section:
    name=CentOS-$releasever - Base
    You will see in this example both the mirrorlist and baseurl are commented out, simply removing the ‘#’ on baseurl will resolve the above issue. If you happen to have an incorrect mirror or baseurl, you can find some defaults on


    [B]Error: Package: redhat-lsb-core-4.0-7.el6.centos.x86_64 (base)
    Requires: perl-CGI
    You could try using --skip-broken to work around the problem[/B]
    This error is another simple issue to resolve, however, the error indicated here is not very descriptive on what the actual problem is. In this case, perl* is being excluded in the excludes line in /etc/yum.conf:
    grep exclude /etc/yum.conf
    exclude=perl* bind-chroot courier* dovecot* exim* filesystem httpd* mod_ssl* mydns* mysql* nsd* php* proftpd* pure-ftpd* ruby* spamassassin* squirrelmail*
    Removing the perl* entry in the excludes line allows for this error to be resolved.


    [B]Error: Multilib version problems found. This often means that the root cause is something else and multilib version checking is just pointing out that there is a problem.[/B]
    This error happens when there are two of the same package installed but have different architecture types (i.e. x86_64 and i686). The solution to this is to remove the architecture that isn’t the present system you’re on.
    The first thing you will want to do is confirm the actual architecture the system is on with:
    uname -r
    you can see here that we’re on x86_64 so we would want to remove the i686 package with:
    yum remove sqlite-3.8.2-1.i686
    You should then be able to proceed with your original yum transaction.


    [B]yum update
    Loaded plugins: downloadonly, fastestmirror
    Loading mirror speeds from cached hostfile
    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 309, in user_main
    errcode = main(args)
    File "/usr/share/yum-cli/", line 178, in main
    result, resultmsgs = base.doCommands()
    File "/usr/share/yum-cli/", line 345, in doCommands
    File "/usr/lib/python2.4/site-packages/yum/", line 101, in _getTs
    File "/usr/lib/python2.4/site-packages/yum/", line 112, in _getTsIn fo
    pkgSack = self.pkgSack
    File "/usr/lib/python2.4/site-packages/yum/", line 661, in 
    pkgSack = property(fget=lambda self: self._getSacks(),
    File "/usr/lib/python2.4/site-packages/yum/", line 501, in _getSack s
    File "/usr/lib/python2.4/site-packages/yum/", line 232, in populateSac k
    File "/usr/lib/python2.4/site-packages/yum/", line 79, in doSetup'postreposetup')
    File "/usr/lib/python2.4/site-packages/yum/", line 179, in run
    func(conduitcls(self, self.base, conf, **kwargs))
    File "/usr/lib/yum-plugins/", line 181, in postreposetup_hook
    all_urls = FastestMirror(all_urls).get_mirrorlist()
    File "/usr/lib/yum-plugins/", line 333, in get_mirrorlist
    File "/usr/lib/yum-plugins/", line 376, in _poll_mirrors
    File "/usr/lib64/python2.4/", line 416, in start
    _start_new_thread(self.__bootstrap, ())
    thread.error: can't start new thread[/B]
    This error is typically associated with possible RPM database corruption which can be resolved with a few commands.
    Please keep in mind that while this normally resolves the issue, there is always the possibility for further corruption and should be taken at your own risk.

    yum clean all
    mkdir /var/lib/rpm/backup
    mv /var/lib/rpm/__db* /var/lib/rpm/backup
    rpm -vv --rebuilddb
    yum update

    [B]# yum install screen
    Loaded plugins: fastestmirror, rhnplugin
    Profilename: test.test
    IP: Not licensed
    This system is not registered with CLN.
    CLN support will be disabled.
    Loading mirror speeds from cached hostfile
    cl-mariadb-5.5 | 951 B 00:00 
    Setting up Install Process
    No package screen available.
    Error: Nothing to do[/B]
    This error is commonly seen on systems that are not registered or licensed with the RHN (RedHat Network) or CLN (CloudLinux Network). To resolve this issue you will typically need to register the system with either network and then re-run the command.

    You can find instructions on how to register with the RHN here:
    You can find instructions on how to register with the CLN here: CloudLinux OS

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice