Results 1 to 3 of 3

Thread: yum or up2date on RHEL

  1. #1
    Junior Member Newbie
    Join Date
    Sep 2007
    Posts
    3

    Default yum or up2date on RHEL

    Hey Guys -

    I just got a VPS300 from Spry today (Plesk) and am having some problems getting package managers installed.

    I'm used to using up2date, but that requires a Red Hat network subscription. To the best of my knowledge, my account didn't come with one, so the only other option I know of is yum.

    So trying to get yum installed has been a huge pain. I've tried a couple RPMs, and they're all missing dependencies. I've installed the dependencies I could find using rpmfind.net, but for some reason RPM doesn't recognize that I have the right versions of stuff installed.

    For example:

    Code:
    [root@jehova src]# rpm -i yum-3.2.5-1.fc8.noarch.rpm 
    error: Failed dependencies:
            python >= 2.4 is needed by yum-3.2.5-1.fc8.noarch
            python(abi) = 2.5 is needed by yum-3.2.5-1.fc8.noarch
            python-iniparse is needed by yum-3.2.5-1.fc8.noarch
            python-sqlite is needed by yum-3.2.5-1.fc8.noarch
            rpm >= 0:4.4.2 is needed by yum-3.2.5-1.fc8.noarch
            urlgrabber is needed by yum-3.2.5-1.fc8.noarch
            yum-metadata-parser >= 1.1.0 is needed by yum-3.2.5-1.fc8.noarch
    [root@jehova src]# python -V
    Python 2.5.1
    Doing a search for python-abi on rpmfind.net shows the latest available RPM to be 2.2, not 2.5 as needed. But since it's a set of backwards-compatibility libraries (or at least that's what rpmfind.net says), it should have been installed with Python 2.5...and it's not.

    RPM is also old, at 4.3.3 on this box.

    I built python 2.5 myself from source, and then tried to do the same thing with Yum. Funny thing happens when I try building yum:

    Code:
    [root@jehova yum-3.2.0]# make
    for d in rpmUtils yum etc docs; do make PYTHON=python -C $d; [ $? = 0 ] || exit 1 ; done
    make[1]: Entering directory `/root/src/yum-3.2.0/rpmUtils'
    echo "Nothing to do"
    Nothing to do
    make[1]: Leaving directory `/root/src/yum-3.2.0/rpmUtils'
    make[1]: Entering directory `/root/src/yum-3.2.0/yum'
    echo "Nothing to do"
    Nothing to do
    make[1]: Leaving directory `/root/src/yum-3.2.0/yum'
    make[1]: Entering directory `/root/src/yum-3.2.0/etc'
    echo "Nothing to do"
    Nothing to do
    make[1]: Leaving directory `/root/src/yum-3.2.0/etc'
    make[1]: Entering directory `/root/src/yum-3.2.0/docs'
    echo "Nothing to do"
    Nothing to do
    make[1]: Leaving directory `/root/src/yum-3.2.0/docs'
    Make install copies a bunch of stuff, but when I run yum:

    Code:
    [root@jehova yum-3.2.0]# 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.3.4 (#1, Feb  6 2006, 10:38:46) 
    [GCC 3.4.5 20051201 (Red Hat 3.4.5-2)]
    
    If you cannot solve this problem yourself, please go to 
    the yum faq at:
      *edited due to forum restrictions*
    I'm at my wit's end here. Can somebody help me please?

  2. #2
    Forum Administrator Power Poster Lyle@Spry's Avatar
    Join Date
    May 2005
    Posts
    455

    Default

    Quote Originally Posted by Phoenix
    Code:
    [root@jehova yum-3.2.0]# 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.3.4 (#1, Feb  6 2006, 10:38:46) 
    [GCC 3.4.5 20051201 (Red Hat 3.4.5-2)]
    
    If you cannot solve this problem yourself, please go to 
    the yum faq at:
      *edited due to forum restrictions*
    This shows that yum is using the python installed with the system, not your compiled from source version. Check the top line of the file that `which yum` returns. If it just says #!/usr/bin/python change that to the full path to your source installed python. (Probably #!/usr/local/bin/python) Alternatively you could move /usr/local/bin to the front of your $PATH environment variable to give binaries installed in /usr/local/bin preference over the system defaults of /bin and /usr/bin, though that would only affect your login. Safer to modify the yum script directly to specify your custom install of Python.

  3. #3
    Junior Member Newbie
    Join Date
    Sep 2007
    Posts
    3

    Default

    Thanks Lyle. I went ahead today and had support roll me back to a FC4 install, instead of RHEL, under the idea that installing a yum RPM would be easier, on account of it being Fedora. Well, no such luck.

    RPMs didn't want to install, so I grabbed the source again from duke.edu and tried to compile it, and got the same thing with it leaving directories with "nothing to do". So I fired up yum and got the same prompt as before.

    I did a vi /usr/bin/yum and indeed, it's looking for Python in /usr/bin/python. But, Python is an updated version:

    Code:
    /usr/bin/python -V
    Python 2.4.1
    So, I fire up Python and try to import yum:
    Code:
    Python 2.4.1 (#1, May 16 2005, 15:19:29) 
    [GCC 4.0.0 20050512 (Red Hat 4.0.0-5)] on linux2
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import yum
    Traceback (most recent call last):
      File "<stdin>", line 1, in ?
    ImportError: No module named yum
    >>>
    I'm thoroughly confused So far I've been installing packages from source and the occasional RPM, but I'd really like to have yum working so I can pro-actively patch my system to prevent security problems and bugs from arising.
    Last edited by Phoenix; 09-12-2007 at 06:33 PM.

Bookmarks

Posting Permissions

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