Find the answer to your Linux question:
Results 1 to 7 of 7
yum the problem started I upgraded to python Code: [root server ~]# yum There was a problem importing one of the Python modules required to run yum. The error leading ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jan 2013
    Posts
    1

    2 problem rpm + yum no work


    yum the problem started I upgraded to python
    Code:
    [root server ~]# yum
    There was a problem importing one of the Python modules
    required to run yum. The error leading to this problem was:
    
       No module named yum
    
    Please install a package which provides this module, or
    verify that the module is installed correctly.
    
    It's possible that the above module doesn't match the
    current version of Python, which is:
    2.7.3 (default, Jan 26 2013, 19:47:35)
    [GCC 4.1.2 20080704 (Red Hat 4.1.2-54)]
    
    If you cannot solve this problem yourself, please go to
    the yum faq at:
     
    
    
    [root server ~]#

    rpm problem - Every command I do is think many time apart from -help
    Code:
    [root server ~]#  rpm -qa
    Does not respond?

  2. #2
    Linux Newbie
    Join Date
    Jun 2012
    Posts
    100
    It seems your yum infra is corrupted. You need to manually reinstall yum. However I was not able to find the RPM's. They don't seem to be updated between 4.0 and 4.2 so you have to use the ISO I guess.

    Exactly what packages did you upgrade?

  3. #3
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,517
    Yum relies extensively upon Python, so if the upgrade is not perfectly successful (such as may happen if you upgrade from RPM), they you are toast! FWIW, DO NOT upgrade python in a RH system from RPMs - ONLY upgrade via yum directly. If you need a newer version, install into /usr/local by building from sources, and NOT by installing the RPM binaries with YUM, otherwise this is what you might expect...
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  4. #4
    Linux Newbie
    Join Date
    Jun 2012
    Posts
    100
    Quote Originally Posted by Rubberman View Post
    Yum relies extensively upon Python, so if the upgrade is not perfectly successful (such as may happen if you upgrade from RPM), they you are toast! FWIW, DO NOT upgrade python in a RH system from RPMs - ONLY upgrade via yum directly. If you need a newer version, install into /usr/local by building from sources, and NOT by installing the RPM binaries with YUM, otherwise this is what you might expect...
    So I take it you also happen to know the solution?

  5. #5
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,517
    Reinstall from the proper rpm files using the rpm command instead of yum would be the first thing I would try.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  6. #6
    Linux Newbie
    Join Date
    Jun 2012
    Posts
    100
    Quote Originally Posted by Rubberman View Post
    Reinstall from the proper rpm files using the rpm command instead of yum would be the first thing I would try.
    Yes, that is what I suggested as well. So I guess we are in the correct direction, thanks.

    But where do you get these rpms?

    I think (I hope) that you can use yumdownloader for this. In /var/log there should be a logfile displaying what you last did during install/upgrade. /var/log/rpm.log maybe? Check it's contents for the last batch of installed packages.

    Download these with yumdownloader and then install them with rpm.

  7. #7
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,517
    The rpm command will download and install them as necessary. There are a tonne of python rpms, and a number for yum. I'm not sure which python rpms you need since you never posted the actual error output from yum here...

    Here is a list of the packages for yum that I have installed in my system:
    Code:
    PackageKit-yum.x86_64                   0.5.8-13.el6                @anaconda-SL-201101262058.x86_64/6
    PackageKit-yum-plugin.x86_64            0.5.8-13.el6                @anaconda-SL-201101262058.x86_64/6
    anaconda-yum-plugins.noarch             1:1.0-5.1.el6               @sl/6       
    yum.noarch                              3.2.27-14.el6               @anaconda-SL-201101262058.x86_64/6
    yum-autoupdate.noarch                   5:2-5.0                     @sl-security
    yum-conf-adobe.x86_64                   6-1                         @sl/6       
    yum-conf-atrpms.x86_64                  6-1                         @sl/6       
    yum-conf-elrepo.noarch                  6-1                         @sl/6       
    yum-conf-epel.noarch                    6-1                         @sl/6       
    yum-conf-rpmforge.x86_64                6-1                         @sl/6       
    yum-metadata-parser.x86_64              1.1.2-14.1.el6              @anaconda-SL-201101262058.x86_64/6
    yum-plugin-security.noarch              1.1.26-11.el6               @sl         
    yum-utils.noarch                        1.1.26-11.el6               @anaconda-SL-201101262058.x86_64/6
    FWIW, I am running Scientific Linux, a Red Hat Enterprise Linux (RHEL) clone much like CentOS, hence the sl/6 repositories. The anaconda ones are from the original installation disc. The yum-conf-* packages are extra repositories such as epel, rpmforge, etc. Not needed for yum to work.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •