A Problem using yum on Linux Fedora Core 4 - Linux

This is a discussion on A Problem using yum on Linux Fedora Core 4 - Linux ; Please feel free to assume I really don't know what I'm talking about, because I am a complete idiot. I'm running Fedora Core 4 on an older IBM NetVista with no problems other than being unable to have any kind ...

+ Reply to Thread
Results 1 to 5 of 5

Thread: A Problem using yum on Linux Fedora Core 4

  1. A Problem using yum on Linux Fedora Core 4

    Please feel free to assume I really don't know what I'm talking about,
    because I am a complete idiot.

    I'm running Fedora Core 4 on an older IBM NetVista with no problems
    other than being unable to have any kind of automated update process.
    There's a Red Hat Alert Notification button on my toolbar that flashes
    an exclamation point in a red circle, attempts to use up2date to
    list/obtain available updates, but this doesn't work because it asks for
    my Red Hat Network account (I have one, which I fill in along with the
    password), then fails to complete.

    I've looked on the web and in Google Groups archives, and the word on
    the street is to use "yum". But after I run my set-'em-up yum
    configuration script (see below), and execute any command such as "yum
    update" running as root, I get the following message:

    -----
    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.4.1 (#1, May 16 2005, 15:19:29)
    [GCC 4.0.0 20050512 (Red Hat 4.0.0-5)]

    If you cannot solve this problem yourself, please send this
    message to .
    -----

    I sent the message, of course, but have had no response after several days.

    Here's the yum set-'em-up config script I am running (also pirated from
    a web page):

    -----
    #!/bin/sh
    echo "Yum Updater by Ian Richardson"
    echo "last updated 22 December 2004"
    echo ""

    echo "download latest yum.conf"
    wget http://www.fedorafaq.org/samples/yum.conf
    echo ""
    echo "installing yum.conf..."
    cp yum.conf /etc/yum.conf
    echo "...done"
    echo ""
    echo "deleting temp file..."
    rm yum.conf
    echo "...done"
    echo ""

    echo "importing gpg keys..."
    echo "redhat..."
    rpm --import /usr/share/doc/fedora-release-4/RPM-GPG-KEY*
    echo "...done"
    echo ""

    echo "fedora.us..."
    rpm --import http://www.fedora.us/FEDORA-GPG-KEY
    echo "...done"
    echo ""

    echo "rpm.livna.com..."
    rpm --import http://rpm.livna.org/RPM-LIVNA-GPG-KEY
    echo "...done"
    echo ""

    echo "fresh rpm..."
    rpm --import http://freshrpms.net/packages/RPM-GPG-KEY.txt
    echo "...done"
    echo ""

    echo "dag..."
    rpm --import http://dag.wieers.com/packages/RPM-GPG-KEY.dag.txt
    echo "...done"
    echo ""

    echo "atrpms..."
    rpm --import http://atrpms.net/RPM-GPG-KEY.atrpms
    echo "...done"
    echo ""

    echo "newrpms..."
    rpm --import http://newrpms.sunsite.dk/gpg-pubkey-newrpms.txt
    echo "...done"
    echo ""

    echo "dries..."
    rpm --import http://apt.sw.be/dries/RPM-GPG-KEY.dries.txt
    echo "...done"
    echo ""

    echo "jpackage..."
    rpm --import http://www.jpackage.org/jpackage.asc
    echo "...done"
    echo ""

    #run yum to check for updates
    echo "running yum (yum -y update)"
    yum -y update
    echo ""
    echo "yum updater complete"
    -----

    Any help would be greatly appreciated. Any insults would be appreciated
    as well, since I probably won't understand them either.

    Best,
    WMD

    --
    Wayne Delia, wmd@deliafamily.net
    Delta Iota Chapter Advisor, Phi Kappa Sigma at Marist College
    "I'm beginning to sober up, and you're scaring me!" (Tom Servo, MST3K)

  2. Re: A Problem using yum on Linux Fedora Core 4

    On Thu, 13 Oct 2005 17:19:18 +0200, Wayne Delia wrote:

    > Please feel free to assume I really don't know what I'm talking about,
    > because I am a complete idiot.


    Ah, so I am not alone!

    > I'm running Fedora Core 4 on an older IBM NetVista with no problems
    > other than being unable to have any kind of automated update process.


    I run FC4 too, and have removed that Alert Notification. Annoying, when
    it does not work.

    > -----
    > 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
    >


    Python *should* look for that module in /usr/lib/python-2.4/site-packages.
    If it does not, there is something wrong with your python installation.

    There is *should* find a directory "yum" containing 20 files named *.py,
    and their compiled equivalents named *.pyc.

    That directory and those files are placed there by the yum rpm. What
    version of yum do you have? Earlier versions assume python2.3, and place
    the files in /usr/lib/python-2.3 rather than /usr/lib/python-2.4.

    Also, what version of python do you have?

    [...]
    > If you cannot solve this problem yourself, please send this
    > message to .
    > -----
    >
    > I sent the message, of course, but have had no response after several days.


    You did get an answer:

    > Date: Thu, 13 Oct 2005 18:42:20 +0200
    > From: "Glen Vickers"
    > To: "'Yellowdog Updater, Modified'"
    > Subject: RE: [Yum] Trouble running 'yum update' on Fedora Core 4
    >The problem is actually a python problem. Did you install the RPM version
    > or do it from SRC? If I were you I would compile it and uninstall the RPM
    > version to that it's made for your box. If you want to find out exactly what the error is and try to resolve it
    > simpler try this
    > https://lists.dulug.duke.edu/piperma...st/007246.html
    >Glen Vickers
    > BSIT



    > Here's the yum set-'em-up config script I am running (also pirated from
    > a web page):
    >
    > -----
    > #!/bin/sh
    > echo "Yum Updater by Ian Richardson"
    > echo "last updated 22 December 2004"
    > echo ""
    >
    > echo "download latest yum.conf"
    > wget http://www.fedorafaq.org/samples/yum.conf
    > echo ""
    > echo "installing yum.conf..."
    > cp yum.conf /etc/yum.conf
    > echo "...done"
    > echo ""
    > echo "deleting temp file..."
    > rm yum.conf
    > echo "...done"
    > echo ""
    >
    > echo "importing gpg keys..."
    > echo "redhat..."
    > rpm --import /usr/share/doc/fedora-release-4/RPM-GPG-KEY*
    > echo "...done"
    > echo ""
    >
    > echo "fedora.us..."
    > rpm --import http://www.fedora.us/FEDORA-GPG-KEY
    > echo "...done"
    > echo ""
    >
    > echo "rpm.livna.com..."
    > rpm --import http://rpm.livna.org/RPM-LIVNA-GPG-KEY
    > echo "...done"
    > echo ""
    >
    > echo "fresh rpm..."
    > rpm --import http://freshrpms.net/packages/RPM-GPG-KEY.txt
    > echo "...done"
    > echo ""
    >
    > echo "dag..."
    > rpm --import http://dag.wieers.com/packages/RPM-GPG-KEY.dag.txt
    > echo "...done"
    > echo ""
    >
    > echo "atrpms..."
    > rpm --import http://atrpms.net/RPM-GPG-KEY.atrpms
    > echo "...done"
    > echo ""
    >
    > echo "newrpms..."
    > rpm --import http://newrpms.sunsite.dk/gpg-pubkey-newrpms.txt
    > echo "...done"
    > echo ""
    >
    > echo "dries..."
    > rpm --import http://apt.sw.be/dries/RPM-GPG-KEY.dries.txt
    > echo "...done"
    > echo ""
    >
    > echo "jpackage..."
    > rpm --import http://www.jpackage.org/jpackage.asc
    > echo "...done"
    > echo ""
    >
    > #run yum to check for updates
    > echo "running yum (yum -y update)"
    > yum -y update
    > echo ""
    > echo "yum updater complete"



    This script looks very sound and fine to me. I guess what you have to do
    is to fix the python installation. Can you say a little more about how you
    did install it? If at all possible you should download and install rpm
    packages made for your distibution (FC4) rather than tarballs from the
    home site of the package.

    I have the following python packages:
    python-2.4.1-2.i386.rpm
    python-devel-2.4.1-2.i386.rpm
    python-elementtree-1.2.6-4.i386.rpm
    python-numeric-23.7-2.i386.rpm
    python-sqlite-1.1.6-1.i386.rpm
    python-urlgrabber-2.9.6-1.noarch.rpm

    and yum:

    yum-2.4.0-0.fc4.noarch.rpm

    If I query the rpm system about the dependencies of yum, I get

    $ rpm -q -requires yum
    /bin/bash
    /bin/sh
    /bin/sh
    /bin/sh
    /sbin/chkconfig
    /sbin/service
    /usr/bin/python
    config(yum) = 2.4.0-0.fc4
    coreutils
    libxml2-python
    python
    python(abi) = 2.4
    python-elementtree
    python-sqlite
    rpm >= 0:4.1.1
    rpm-python
    rpmlib(CompressedFileNames) <= 3.0.4-1
    rpmlib(PayloadFilesHavePrefix) <= 4.0-1
    urlgrabber

    This list is not easy to work with, for several reasons. However,
    you can sometimes glean a usefull hint from it. The problem is that
    e.g. "urlgrabber" is not an rpm package, but a mythical entity that
    some rpm package provides.

    $ rpm -q --provides python-urlgrabber
    urlgrabber
    python-urlgrabber = 2.9.6-1

    This shows that "python-urlgrabber" is the rpm package that provides
    "urlgrabber". Also, for some unfathomable reason, many packages
    "depend" on what they themselves provide, like in this case, yum
    both provides and requires "config(yum) = 2.4.0-0.fc4". (Which
    means that this dependency is not a problem.)

    But once you get yum running, yum disentangles all that for you!
    Until then, use rpm to install things, and when rpm says it cannot
    install because of a missing dependency, think twice before adding
    --force --nodeps or similar to the rpm command line.

    -Enrique

  3. Re: A Problem using yum on Linux Fedora Core 4

    Enrique Perez-Terron wrote:

    >> I'm running Fedora Core 4 on an older IBM NetVista with no problems
    >> other than being unable to have any kind of automated update process.

    >
    > I run FC4 too, and have removed that Alert Notification. Annoying, when
    > it does not work.


    Thanks so much for your response, and sorry for the delay getting back
    to you - I've been shaking off the worst phase of a 24-hour bug, and
    further details about that are not pretty. How can I get rid of the RH
    Agent Notification button? Right-clicking on it gives the options "Check
    for updates," "launch up2date," "configuration," "RHN web page,"
    "About," and "Exit." Selecting "configuration ==> Forward" shows a Terms
    of Service screen to remove the icon from the taskbar, but it only stays
    in effect for the current session. On reboot, it's back.

    >> -----
    >> 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
    >>

    > Python *should* look for that module in /usr/lib/python-2.4/site-packages.
    > If it does not, there is something wrong with your python installation.


    There probably is; what I did was download the tar file
    Python-2.4.2.tar, un-tar'ed it, and followed the install procedure. Not
    at all sure how to uninstall a package installed that way. No directory
    /usr/lib/python-2.4, but there is one for /usr/lib/python2.4, and that
    does have a subdirectory site-packages.

    > There is *should* find a directory "yum" containing 20 files named *.py,
    > and their compiled equivalents named *.pyc.


    No subdirectory named "yum" in /usr/lib/python2.4/site-packages...

    > That directory and those files are placed there by the yum rpm. What
    > version of yum do you have? Earlier versions assume python2.3, and place
    > the files in /usr/lib/python-2.3 rather than /usr/lib/python-2.4.
    >
    > Also, what version of python do you have?


    ~ > whoami
    root
    ~ > python
    Python 2.4.2 (#1, Oct 12 2005, 19:47:15)
    [GCC 4.0.0 20050519 (Red Hat 4.0.0-8)] on linux2
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import yum

    Traceback (most recent call last):
    File "", line 1, in ?
    ImportError: No module named yum
    >>>


    On looking at that, I'm pretty much convinced my Python installation is
    a huge mess. Any tips on how to de-install it? I'll check the un-tar'd
    directory to see if I can back it out. I seem to remember thinking "Hey,
    python is python, just get the latest version from wherever" instead of
    thinking it through.

    >> If you cannot solve this problem yourself, please send this
    >> message to .
    >> -----
    >>
    >> I sent the message, of course, but have had no response after several
    >> days.

    >
    > You did get an answer:
    >
    >> Date: Thu, 13 Oct 2005 18:42:20 +0200
    >> From: "Glen Vickers"
    >> To: "'Yellowdog Updater, Modified'"
    >>
    >> Subject: RE: [Yum] Trouble running 'yum update' on Fedora Core 4
    >> The problem is actually a python problem. Did you install the RPM
    >> version
    >> or do it from SRC? If I were you I would compile it and uninstall the
    >> RPM
    >> version to that it's made for your box. If you want to find out
    >> exactly what the error is and try to resolve it
    >> simpler try this
    >> https://lists.dulug.duke.edu/piperma...st/007246.html
    >> Glen Vickers
    >> BSIT


    Thanks for pointing that out, I didn't know where to look for that
    response. Wasn't kidding when I said I was an idiot.

    >> Here's the yum set-'em-up config script I am running (also pirated from
    >> a web page):


    > This script looks very sound and fine to me. I guess what you have to do
    > is to fix the python installation. Can you say a little more about how you
    > did install it? If at all possible you should download and install rpm
    > packages made for your distibution (FC4) rather than tarballs from the
    > home site of the package.


    I'll go look for the proper rpm and maybe will have better luck this time.

    >
    > I have the following python packages:
    > python-2.4.1-2.i386.rpm
    > python-devel-2.4.1-2.i386.rpm
    > python-elementtree-1.2.6-4.i386.rpm
    > python-numeric-23.7-2.i386.rpm
    > python-sqlite-1.1.6-1.i386.rpm
    > python-urlgrabber-2.9.6-1.noarch.rpm
    >
    > and yum:
    >
    > yum-2.4.0-0.fc4.noarch.rpm
    >
    > If I query the rpm system about the dependencies of yum, I get
    >
    > $ rpm -q -requires yum
    > /bin/bash
    > /bin/sh
    > /bin/sh
    > /bin/sh
    > /sbin/chkconfig
    > /sbin/service
    > /usr/bin/python
    > config(yum) = 2.4.0-0.fc4
    > coreutils
    > libxml2-python
    > python
    > python(abi) = 2.4
    > python-elementtree
    > python-sqlite
    > rpm >= 0:4.1.1
    > rpm-python
    > rpmlib(CompressedFileNames) <= 3.0.4-1
    > rpmlib(PayloadFilesHavePrefix) <= 4.0-1
    > urlgrabber
    >
    > This list is not easy to work with, for several reasons. However,
    > you can sometimes glean a usefull hint from it. The problem is that
    > e.g. "urlgrabber" is not an rpm package, but a mythical entity that
    > some rpm package provides.
    >
    > $ rpm -q --provides python-urlgrabber
    > urlgrabber
    > python-urlgrabber = 2.9.6-1
    >
    > This shows that "python-urlgrabber" is the rpm package that provides
    > "urlgrabber". Also, for some unfathomable reason, many packages
    > "depend" on what they themselves provide, like in this case, yum
    > both provides and requires "config(yum) = 2.4.0-0.fc4". (Which
    > means that this dependency is not a problem.)
    >
    > But once you get yum running, yum disentangles all that for you!
    > Until then, use rpm to install things, and when rpm says it cannot
    > install because of a missing dependency, think twice before adding
    > --force --nodeps or similar to the rpm command line.
    >
    > -Enrique


    Again, thanks so much for your help!

    --
    Wayne Delia, wmd@deliafamily.net
    Delta Iota Chapter Advisor, Phi Kappa Sigma at Marist College
    "I'm beginning to sober up, and you're scaring me!" (Tom Servo, MST3K)

  4. Re: A Problem using yum on Linux Fedora Core 4

    Enrique, I located and installed the proper python rpm's, and now yum
    works like a charm. Thanks very much for your help!

    Best,
    WMD

    --
    Wayne Delia, wmd@deliafamily.net
    Delta Iota Chapter Advisor, Phi Kappa Sigma at Marist College
    "I'm beginning to sober up, and you're scaring me!" (Tom Servo, MST3K)

  5. Re: A Problem using yum on Linux Fedora Core 4


    "Wayne Delia" wrote in message
    news:hHD3f.21570$y05.13210@trndny07...

    > There probably is; what I did was download the tar file Python-2.4.2.tar,
    > un-tar'ed it, and followed the install procedure. Not at all sure how to
    > uninstall a package installed that way. No directory /usr/lib/python-2.4,
    > but there is one for /usr/lib/python2.4, and that does have a subdirectory
    > site-packages.


    Wayne? While this may work with tarball based distributions, This Way Lies
    Madness in the world of distributions with package managers.

    Please install system tools from RPM packages wherever possible to avoid
    conflicts or disagreements with the rest of your system about software
    requirements and dependencies. Yum is available as an RPM package at a FC4
    mirror near you: download and install *THAT*, and make sure your python is
    installed from the RPM's, not merely from source tarballs to avoid
    conflicts.



+ Reply to Thread