Probable solution to "cannot import <blah>":
Your error sounds identical in spirit to the error I posted about back
on 12/20/2006, with subject line " yum: build/install problem
(cannot import logginglevels)". I finally resolved it, but never
replied to my own post. Now is as good a time as any to post a solution
to a problem many seem to be having.
You say you created rpms from source rpms and then installed stuff --
that's what I thought I did too. But I actually hadn't accomplished
that, so maybe you didn't either. The following may help:
I originally did not realize that there is a difference in how one
installs source rpms and (normal?) rpms. When you have a (normal?) rpm,
you just install it with 'rpm <package>' or perhaps yum. However,
*source* rpm files (which I believe can be identified by having the
extension .src.rpm) require two steps. First you build an rpm from the
source rpm. Then, you *still* need to install that newly built rpm.
(This is the step that I neglected to do, and probably you did too. As
a result, yum is not installed, and things can't be imported properly.)
To actually install the new rpm, you have to find where it landed on you
machine when you built it. The webpage that helped me was:
http://www.linuxhomenetworking.com/wiki/index.php/Quick_HOWTO_:_Ch06_:_Installing_Linux_Software#How_to_Install_Source_RPMs
The key hint I needed was:
The compiled RPM file can now be found in one of the architecture
subdirectories under /usr/src/redhat/RPMS directory. For example, if
you compiled an i386 architecture version of the RPM it will placed in
the i386 subdirectory.
You will then have to install the compiled RPMs found in their
respective subdirectories as you normally would.
So I dug into /usr/src/redhat/RPMS, and sure enough the rpm was there.
Once I installed it, yum worked again.
Andrew
P.S. The reason I had trouble with installing yum is because it was the
first source RPM I'd ever needed to install. It seems that most other
things I want to install I can find normal rpms for; but *all* of the
rpms for 'yum' are source rpms.
Leslie Katz wrote:
My head is spinning so much, I'm not sure anymore what I did, but I believe that I created from source rpms and then installed yum-3.0.4-1.noarch.rpm and yumupdatesd-3.0.4-1.noarch.rpm. Then, when I ran yum, I got the following output:
[leslie@localhost ~]$ /usr/bin/yum
Traceback (most recent call last):
File "/usr/bin/yum", line 28, in ?
import yummain
File "/usr/share/yum-cli/yummain.py", line 24, in ?
from yum import plugins
ImportError: cannot import name plugins
[leslie@localhost ~]$
All of this is quite beyond me, but I did look at the FAQ and Google for the ImportError. The latter took me to one thread on this list, but it petered out without any resolution.
I'd be very grateful if anyone could explain to me how I go about trying to overcome the error.
Thanks,
Leslie
Send instant messages to your online friends http://au.messenger.yahoo.com
_______________________________________________
Yum mailing list
Yum@xxxxxxxxxxxxxxxxxxxx
https://lists.dulug.duke.edu/mailman/listinfo/yum
_______________________________________________
Yum mailing list
Yum@xxxxxxxxxxxxxxxxxxxx
https://lists.dulug.duke.edu/mailman/listinfo/yum