[Yum] yum: build/install problem (cannot import logginglevels)

Andrew Schwarzkopf adschw at umich.edu
Thu Dec 21 01:07:30 UTC 2006


Hi list!

Problem: I tried to install yum version 3.0.1, and failed.  Now yum no 
longer works.

I'm running FC5.  I have Python 2.4.3 and RPM version 4.4.2.  So I 
believe this should satisfy the requirements of yum 3.0.1.
I've been using Linux for about maybe a year, and running it for about 6 
months now -- so I'm not completely a newbie, but my knowledge is a bit 
spotty (particularly on how to install things).  This may be part of why 
my attempted installation failed.

I downloaded
http://linux.duke.edu/projects/yum/download/3.0/yum-3.0.1.tar.gz, and
unzipped it with "tar xzvf".  I then switched to the yum-3.0.1 directory
created by the unzipping process.  The "install" file there said to try
"make", or if I felt "masochistic" then "make install".

I typed "make".  It didn't seem to do anything.  The output was:

**
for d in rpmUtils yum etc docs; do make PYTHON=python -C $d; [ $? = 0 ]
|| exit
1 ; done
make[1]: Entering directory `/home/andy/download/yum-3.0.1/rpmUtils'
echo "Nothing to do"
Nothing to do
make[1]: Leaving directory `/home/andy/download/yum-3.0.1/rpmUtils'
make[1]: Entering directory `/home/andy/download/yum-3.0.1/yum'
echo "Nothing to do"
Nothing to do
make[1]: Leaving directory `/home/andy/download/yum-3.0.1/yum'
make[1]: Entering directory `/home/andy/download/yum-3.0.1/etc'
echo "Nothing to do"
Nothing to do
make[1]: Leaving directory `/home/andy/download/yum-3.0.1/etc'
make[1]: Entering directory `/home/andy/download/yum-3.0.1/docs'
echo "Nothing to do"
Nothing to do
make[1]: Leaving directory `/home/andy/download/yum-3.0.1/docs'
**


So I tried typing "make install", instead.  It did something.  Output
was long.  (Sorry for bombing the list with this, but I guess I should 
include it since I don't know what happened.)

**
mkdir -p /usr/share/yum-cli
for p in callback.py cli.py i18n.py output.py progress_meter.py shell.py 
transla
te.py yumcommands.py yummain.py yum-updatesd.py ; do \
         install -m 644 $p /usr/share/yum-cli/$p; \
done
mv /usr/share/yum-cli/yum-updatesd.py /usr/share/yum-cli/yumupd.py
python -c "import compileall; 
compileall.compile_dir('/usr/share/yum-cli', 1, ''
, 1)"
Listing /usr/share/yum-cli ...
Compiling /usr/share/yum-cli/callback.py ...
Compiling /usr/share/yum-cli/cli.py ...
Compiling /usr/share/yum-cli/i18n.py ...
Compiling /usr/share/yum-cli/output.py ...
Compiling /usr/share/yum-cli/progress_meter.py ...
Compiling /usr/share/yum-cli/pullheaders.py ...
Compiling /usr/share/yum-cli/serverStuff.py ...
Compiling /usr/share/yum-cli/shell.py ...
Compiling /usr/share/yum-cli/translate.py ...
Compiling /usr/share/yum-cli/yumcommands.py ...
Compiling /usr/share/yum-cli/yummain.py ...
Compiling /usr/share/yum-cli/yumupd.py ...
mkdir -p /usr/bin /usr/sbin
install -m 755 bin/yum.py /usr/bin/yum
install -m 755 bin/yum-updatesd.py /usr/sbin/yum-updatesd
mkdir -p /var/cache/yum
for d in rpmUtils yum etc docs; do make PYTHON=python DESTDIR=`cd ; pwd` 
-C $d i
nstall; [ $? = 0 ] || exit 1; done
make[1]: Entering directory `/home/andy/download/yum-3.0.1/rpmUtils'
mkdir -p /root//usr/lib/python2.4/site-packages/rpmUtils
for p in arch.py __init__.py miscutils.py oldUtils.py transaction.py 
updates.py
; do \
         install -m 644 $p 
/root//usr/lib/python2.4/site-packages/rpmUtils/$p; \
done
python -c "import compileall; 
compileall.compile_dir('/root//usr/lib/python2.4/s
ite-packages/rpmUtils', 1, '', 1)"
Listing /root//usr/lib/python2.4/site-packages/rpmUtils ...
Compiling /root//usr/lib/python2.4/site-packages/rpmUtils/__init__.py ...
Compiling /root//usr/lib/python2.4/site-packages/rpmUtils/arch.py ...
Compiling /root//usr/lib/python2.4/site-packages/rpmUtils/miscutils.py ...
Compiling /root//usr/lib/python2.4/site-packages/rpmUtils/oldUtils.py ...
Compiling /root//usr/lib/python2.4/site-packages/rpmUtils/transaction.py ...
Compiling /root//usr/lib/python2.4/site-packages/rpmUtils/updates.py ...
make[1]: Leaving directory `/home/andy/download/yum-3.0.1/rpmUtils'
make[1]: Entering directory `/home/andy/download/yum-3.0.1/yum'
mkdir -p /root//usr/lib/python2.4/site-packages/yum
for p in comps.py config.py constants.py depsolve.py Errors.py 
failover.py __ini
t__.py logginglevels.py mdparser.py misc.py packageSack.py packages.py 
parser.py
  pgpmsg.py plugins.py repoMDObject.py repos.py rpmsack.py 
sqlitecache.py sqlites
ack.py storagefactory.py transactioninfo.py update_md.py yumRepo.py ; do \
         install -m 644 $p /root//usr/lib/python2.4/site-packages/yum/$p; \
done
python -c "import compileall; 
compileall.compile_dir('/root//usr/lib/python2.4/s
ite-packages/yum', 1, '', 1)"
Listing /root//usr/lib/python2.4/site-packages/yum ...
Compiling /root//usr/lib/python2.4/site-packages/yum/Errors.py ...
Compiling /root//usr/lib/python2.4/site-packages/yum/__init__.py ...
Compiling /root//usr/lib/python2.4/site-packages/yum/comps.py ...
Compiling /root//usr/lib/python2.4/site-packages/yum/config.py ...
Compiling /root//usr/lib/python2.4/site-packages/yum/constants.py ...
Compiling /root//usr/lib/python2.4/site-packages/yum/depsolve.py ...
Compiling /root//usr/lib/python2.4/site-packages/yum/failover.py ...
Compiling /root//usr/lib/python2.4/site-packages/yum/logginglevels.py ...
Compiling /root//usr/lib/python2.4/site-packages/yum/mdparser.py ...
Compiling /root//usr/lib/python2.4/site-packages/yum/misc.py ...
Compiling /root//usr/lib/python2.4/site-packages/yum/packageSack.py ...
Compiling /root//usr/lib/python2.4/site-packages/yum/packages.py ...
Compiling /root//usr/lib/python2.4/site-packages/yum/parser.py ...
Compiling /root//usr/lib/python2.4/site-packages/yum/pgpmsg.py ...
Compiling /root//usr/lib/python2.4/site-packages/yum/plugins.py ...
Compiling /root//usr/lib/python2.4/site-packages/yum/repoMDObject.py ...
Compiling /root//usr/lib/python2.4/site-packages/yum/repos.py ...
Compiling /root//usr/lib/python2.4/site-packages/yum/rpmsack.py ...
Compiling /root//usr/lib/python2.4/site-packages/yum/sqlitecache.py ...
Compiling /root//usr/lib/python2.4/site-packages/yum/sqlitesack.py ...
Compiling /root//usr/lib/python2.4/site-packages/yum/storagefactory.py ...
Compiling /root//usr/lib/python2.4/site-packages/yum/transactioninfo.py ...
Compiling /root//usr/lib/python2.4/site-packages/yum/update_md.py ...
Compiling /root//usr/lib/python2.4/site-packages/yum/yumRepo.py ...
make[1]: Leaving directory `/home/andy/download/yum-3.0.1/yum'
make[1]: Entering directory `/home/andy/download/yum-3.0.1/etc'
mkdir -p /root/etc/yum.repos.d
install -m 644 yum.conf /root/etc/yum.conf
mkdir -p /root/etc/logrotate.d
install -m 644 yum.logrotate /root/etc/logrotate.d/yum
mkdir -p /root/etc/rc.d/init.d
install -m 755 yum-updatesd.init /root/etc/rc.d/init.d/yum-updatesd
mkdir -p /root/etc/dbus-1/system.d/
install -m 755 yum-updatesd-dbus.conf 
/root/etc/dbus-1/system.d/yum-updatesd.con               f
mkdir -p /root/etc/yum/
install -m 755 yum-updatesd.conf /root/etc/yum/yum-updatesd.conf
make[1]: Leaving directory `/home/andy/download/yum-3.0.1/etc'
make[1]: Entering directory `/home/andy/download/yum-3.0.1/docs'
mkdir -p /root/usr/share/man/man{5,8}
install -m 644 yum.8 /root/usr/share/man/man8/yum.8
install -m 644 yum-shell.8 /root/usr/share/man/man8/yum-shell.8
install -m 644 yum.conf.5 /root/usr/share/man/man5/yum.conf.5
install -m 644 yum-updatesd.8 /root/usr/share/man/man8/yum-updatesd.8
install -m 644 yum-updatesd.conf.5 
/root/usr/share/man/man5/yum-updatesd.conf.5
make[1]: Leaving directory `/home/andy/download/yum-3.0.1/docs'
**

There didn't seem to be any errors.  However, when I then typed "yum
--version" I got the output:

**
Traceback (most recent call last):
  File "/usr/bin/yum", line 28, in ?
    import yummain
  File "yummain.py", line 25, in ?
    from yum import logginglevels
ImportError: cannot import name logginglevels
**

I get the same output when I try "yum update gnucash", "yum info
gnucash", etc.  So I'm pretty sure yum is not installed properly.  So I
tried installing via another method.  I downloaded the rpm:
http://linux.duke.edu/projects/yum/download/3.0/yum-3.0.1-1.src.rpm
Since I wasn't sure if the rpm would work for my machine, I then did as
the YumFAQ said
http://wiki.linux.duke.edu/YumFaq
and I rebuilt the rpm with the command
rpmbuild --rebuild yum*.src.rpm
This apparently did something, without me even having to install the
rpm.  When I then ran the command "yum update gnucash" I got the output:

**
Traceback (most recent call last):
  File "/usr/bin/yum", line 28, in ?
    import yummain
  File "/usr/share/yum-cli/yummain.py", line 25, in ?
    from yum import logginglevels
ImportError: cannot import name logginglevels
**

Note that this is slightly different than before.  Now it tells me where
the files are that it's running.  So I was able to look in
"/usr/bin/yum" and "/usr/share/yum-cli/yummain.py" to see what was going on.

I can't read python, but it looks like it's importing "yummain" from the
"/usr/share/yum-cli/" directory.  I went to "/usr/share/yum-cli/" to
look at yummain.py.  It tries "from yum import logginglevels", as the
error report said.  I don't know what the "from yum" means, so I don't
know where it's looking, so I don't know why it can't find "logginglevels".

It then occurred to me that I forgot to install via the src.rpm.  So I
did that with
rpm -Uhv yum-3.0.1-1.src.rpm
and then I ran yum again.  Same result.  It doesn't work.

I saw that Mark Ryden posted a similar problem on Oct 3 2006 with the
subject "yum-util : build/install problem", but that it was unresolved.

Help, please?  I'm stuck.

Thanks.
Andrew Schwarzkopf




More information about the Yum mailing list