Re: A Problem using yum on Linux Fedora Core 4

From: Enrique Perez-Terron (enrio_at_online.no)
Date: 10/13/05


Date: Thu, 13 Oct 2005 21:24:33 +0200

On Thu, 13 Oct 2005 17:19:18 +0200, Wayne Delia <wmd@deliafamily.net> 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 <yum@lists.linux.duke.edu>.
> -----
>
> 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" <ldwraith@comcast.net>
> To: "'Yellowdog Updater, Modified'" <yum@lists.dulug.duke.edu>
> 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/pipermail/yum/2005-August/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



Relevant Pages