LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices



Reply
 
Search this Thread
Old 09-20-2006, 03:02 AM   #1
WhatsOnYourBrain
Member
 
Registered: Apr 2006
Posts: 64
Blog Entries: 2

Rep: Reputation: 15
Question yum - cElementTree - Python


hi. something i installed w/ Yum caused yum to stop working. the error is:
Code:
@localhost ~]$ 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 cElementTree

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.3 (#1, Jun 13 2006, 11:46:08)
[GCC 4.1.1 20060525 (Red Hat 4.1.1-1)]

If you cannot solve this problem yourself, please go to
the yum faq at:
  http://wiki.linux.duke.edu/YumFaq
when i went to the YumFaq, i found related info, and upon executing the suggestions there:
Code:
@localhost ~]$ python
Python 2.4.3 (#1, Jun 13 2006, 11:46:08)
[GCC 4.1.1 20060525 (Red Hat 4.1.1-1)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import yum
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/usr/lib/python2.4/site-packages/yum/__init__.py", line 35, in ?
    import comps
  File "/usr/lib/python2.4/site-packages/yum/comps.py", line 18, in ?
    from cElementTree import iterparse
ImportError: No module named cElementTree
how do i fix this? i've read the suggestions for
Code:
rpmbuild --rebuild yum*.src.rpm
but i don't know how to get to doing that part.

thanks!!
 
Old 09-20-2006, 03:27 AM   #2
sn68
Member
 
Registered: Oct 2005
Distribution: FC5
Posts: 338

Rep: Reputation: 30
You can find the latest installed software with "rpm -qa --last" and uninstall it(if rpm packages were installed)
OR
You could try removing yum with rpm -e yum, then downloading the latest package from http://rpm.pbone.net/index.php3/stat...oarch.rpm.html
and installing it with rpm -i yum-2.6.1-0.fc5.noarch.rpm
If it doesn't install, atleast it will tell you what dependencies it is missing, which again could be downloaded & installed

Edit -(Got from another forum) to get yum to work install these from same repository

yum
python-urlgrabber
python-sqlite
python-elementtree

apparently yum misses the dependency "elementtree" and error message gives out "celementtree"

Last edited by sn68; 09-20-2006 at 03:52 AM.
 
Old 09-20-2006, 08:01 AM   #3
WhatsOnYourBrain
Member
 
Registered: Apr 2006
Posts: 64
Blog Entries: 2

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by sn68
Edit -(Got from another forum) to get yum to work install these from same repository

yum
python-urlgrabber
python-sqlite
python-elementtree
how does one go about "[installing] these from same repository"?
i don't know the syntax... it may look like i do from things i've quoted here, but those are usually directly copied from other sites. i'm not sure how to just do it based on the names of the files. (sorry. it's the thickness of my skull getting in the way...)

thanks!
and thanks, sn68 for finding this for me! very awesome!!

EDIT: from additional research, i've tried this -- what should i do... rpm -e everything listed here?
Code:
[root@localhost ~]# rpm -Uvh http://download.fedora.redhat.com/pub/fedora/linux/core/updates/5/i386/yum-2.6.1-0.fc5.noarch.rpm
Retrieving http://download.fedora.redhat.com/pub/fedora/linux/core/updates/5/i386/yum-2.6.1-0.fc5.noarch.rpm
Preparing...                ########################################### [100%]
        package yum-2.6.1-0.fc5 is already installed
[root@localhost ~]# rpm -e yum
error: Failed dependencies:
        yum >= 2.5.3 is needed by (installed) pirut-1.0.3-0.fc5.noarch
        yum >= 2.4 is needed by (installed) yumex-1.0.2-1.0.fc5.noarch
        yum is needed by (installed) mach-0.9.0-1.fc5.i386
        yum >= 2.2.0 is needed by (installed) kyum-0.7.5-3.fc5.i386
[root@localhost ~]#

Last edited by WhatsOnYourBrain; 09-20-2006 at 08:12 AM.
 
Old 09-20-2006, 01:26 PM   #4
sn68
Member
 
Registered: Oct 2005
Distribution: FC5
Posts: 338

Rep: Reputation: 30
To uninstall yum you will need to uninstall yumex, pirut, kyum & mach (these can be installed once you get your yum going) so once you uninstall these and python-urlgrabber, python-sqlite, python-elementtree, you can download these packages from fedora download site or http://rpm.pbone.net and install with rpm.
(rpm -e packagename, do man rpm at terminal to get more info & press q to exit man pages)
Before you start working with yum, you will need to disable one of the conflicting repositories.Can you post what all repositories you have installed? (contents of /etc/yum.repos.d/)
 
Old 09-21-2006, 01:31 AM   #5
WhatsOnYourBrain
Member
 
Registered: Apr 2006
Posts: 64
Blog Entries: 2

Original Poster
Rep: Reputation: 15
hey there, sn68! here's what i've got for the repos:
Code:
-rw-r--r-- 1 root  187 Sep 17 14:10 dries.repo
-rw-r--r-- 1 root  840 Mar 14  2006 fedora-core.repo
-rw-r--r-- 1 root 1549 Mar 14  2006 fedora-development.repo
-rw-r--r-- 1 root  780 Mar 14  2006 fedora-extras-development.repo
-rw-r--r-- 1 root  763 Mar 14  2006 fedora-extras.repo
-rw-r--r-- 1 root  486 Mar 14  2006 fedora-legacy.repo
-rw-r--r-- 1 root  790 Mar 14  2006 fedora-updates.repo
-rw-r--r-- 1 root  865 Mar 14  2006 fedora-updates-testing.repo
-rw-r--r-- 1 root  354 Jun 28  2005 freshrpms.repo
-rw-r--r-- 1 root 1904 Jul 18 17:49 livna-devel.repo
-rw-r--r-- 1 root 1809 Sep 18 08:23 livna.repo
-rw-r--r-- 1 root 1808 Sep 18 08:22 livna.repo~
-rw-r--r-- 1 root  466 Sep 18 03:57 livna.repo.rpmorig
-rw-r--r-- 1 root 2003 Jul 18 17:49 livna-testing.repo
-rw-r--r-- 1 root  249 Sep 17 14:09 macromedia.repo
-rw-r--r-- 1 root  663 Sep 18 08:22 mirrors-rpmforge
-rw-r--r-- 1 root  662 Jun  5 05:46 mirrors-rpmforge~
-rw-r--r-- 1 root  399 Sep 18 08:22 rpmforge.repo
-rw-r--r-- 1 root  398 Jun  5 05:46 rpmforge.repo~
sorry about the permissions and all-- but i thought perhaps the dates there would serve to show what i've customized since i installed this drive after my primary drive became inaccessible not even a week ago.
since my last post here, i've done the following, and am currently in this state at the time of posting:
Code:
[root@localhost ~]# rpm -e yum
error: Failed dependencies:
        yum >= 2.5.3 is needed by (installed) pirut-1.0.3-0.fc5.noarch
        yum >= 2.4 is needed by (installed) yumex-1.0.2-1.0.fc5.noarch
        yum is needed by (installed) mach-0.9.0-1.fc5.i386
        yum >= 2.2.0 is needed by (installed) kyum-0.7.5-3.fc5.i386
[root@localhost ~]# rpm -e pirut
[root@localhost ~]# rpm -e yumex
warning: /etc/yumex.profiles.conf saved as /etc/yumex.profiles.conf.rpmsave
[root@localhost ~]# rpm -e kyum
[root@localhost ~]# rpm -e mach
[root@localhost ~]# rpm -e yum
warning: /etc/yum.conf saved as /etc/yum.conf.rpmsave
[root@localhost ~]# rpm -Uvh http://download.fedora.redhat.com/pub/fedora/linux/core/updates/5/i386/yum-2.6.1-0.fc5.noarch.rpm
Retrieving http://download.fedora.redhat.com/pub/fedora/linux/core/updates/5/i386/yum-2.6.1-0.fc5.noarch.rpm
Preparing...                ########################################### [100%]
   1:yum                    ########################################### [100%]
[root@localhost ~]# yum install pirut
There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:

   No module named cElementTree

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.3 (#1, Jun 13 2006, 11:46:08)
[GCC 4.1.1 20060525 (Red Hat 4.1.1-1)]

If you cannot solve this problem yourself, please go to
the yum faq at:
  http://wiki.linux.duke.edu/YumFaq
so where does this put me in the scheme of things that you had in mind, sn68? thanks for your help!!
 
Old 09-21-2006, 03:25 AM   #6
sn68
Member
 
Registered: Oct 2005
Distribution: FC5
Posts: 338

Rep: Reputation: 30
Hi
Thanks for posting repositories. Apparently dries, rpmforge & livna repositories dont mix. So now disable dries.repo, rpmforge.repo. That will leave fedora-core, fedora-extras, fedora-updates, livna, freshrpms & macromedia repositories enabled
Thereafter uninstall following packages as well

python-urlgrabber
python-sqlite
python-elementtree

Now download the above packages from following links and install with "rpm -i"
http://rpm.pbone.net/index.php3/stat...oarch.rpm.html
http://rpm.pbone.net/index.php3/stat....i386.rpm.html
http://rpm.pbone.net/index.php3/stat....i386.rpm.html

now your yum should be able to run properly

Edit - To be on safer side disable all repos you installed on sep 17 & 18
To disable a repo, open terminal
>su
pwd
>gedit /etc/yum.repos.d/livna.repo
change "enabled=1" to "enabled=0"

Last edited by sn68; 09-21-2006 at 03:31 AM.
 
Old 09-21-2006, 05:50 AM   #7
WhatsOnYourBrain
Member
 
Registered: Apr 2006
Posts: 64
Blog Entries: 2

Original Poster
Rep: Reputation: 15
cool...gotcha! hey, sn68, you do a real good job of helping. maybe it's coincidence, but maybe it's instinct too. what i mean is-- something about your inquiry and assessment allowed us to put aside whether i was educated enough about this stuff to pull it off or not (albeit, i suppose a real beginner might not have known how to post some of that stuff). it's not easy trying to make suggestions when you don't know what the other person knows (i speak from experience as a guitar instructor-- the most difficult assessment period being that of taking on a new student who already knows how to play. it's like "okay. do something. i've gotta figure out what you know; what you need to know, etc."... i dunno... just felt like mentioning that. something you might want to be attentive of and cultivate-- get a gig doing "e-Learning courses"!


anyway... very cool-- i'm going to check this stuff out, and see where it gets me! i'll post back n tell the results, but i really feel like we're on the right track! woo hoo!
(btw... look for a PM from me)
edit: oops... i guess there's no PM'ng here

Last edited by WhatsOnYourBrain; 09-21-2006 at 06:22 AM.
 
Old 09-21-2006, 06:08 AM   #8
WhatsOnYourBrain
Member
 
Registered: Apr 2006
Posts: 64
Blog Entries: 2

Original Poster
Rep: Reputation: 15
what to do when i get this?:
rpm -e python-urlgrabber
error: Failed dependencies:
urlgrabber is needed by (installed) yum-2.6.1-0.fc5.noarch
python-urlgrabber is needed by (installed) createrepo-0.4.6-1.fc3.rf.noarch

is there a way to "Force" it?

would that be rpm -e --force (appname)?

Last edited by WhatsOnYourBrain; 09-21-2006 at 06:10 AM.
 
Old 09-21-2006, 06:43 AM   #9
WhatsOnYourBrain
Member
 
Registered: Apr 2006
Posts: 64
Blog Entries: 2

Original Poster
Rep: Reputation: 15
woohoo!! awesome. i assume that, since yum is in the process of doing the "yum -y update", that i'm good to go, right?



thanks so much for your generous, attentive help!!
 
Old 09-21-2006, 08:05 AM   #10
sn68
Member
 
Registered: Oct 2005
Distribution: FC5
Posts: 338

Rep: Reputation: 30
Hi
Its good to know that we were able to get "yum" back on track, this particular "fault" so to say occured because incompatible packages were installed from repositories which should not have been used together.
More info at http://stanton-finley.net/fedora_cor...s.html#Warning

regards
sn68
 
Old 09-23-2006, 01:08 PM   #11
WhatsOnYourBrain
Member
 
Registered: Apr 2006
Posts: 64
Blog Entries: 2

Original Poster
Rep: Reputation: 15
hey there-- i don't want to bother w/ this thread too much more-- but in case it might help someone else, plus i am a bit curious:

it might not have even been a day later that Yum quit working again-- same error. i've been going off of the StantonFinley rec. (ie. according to his list, to my knowledge, i guess that's using rpmforge instead of livna, and then freshrpms dries, and macromedia.)

this time i removed libstdc++so7.i386, which i installed because of a Firefox XPI i wanted. it was supposed to be libstdc++so5.i386, but that didn't show up specifically-- so i installed the libstdc++so7.i386 which warns that it's unstable and, in so many words, untrustable. it was after i first installed that item that yum first went down (probably not immediately after), but i forgot to uninstall it this past fix.

we'll see what happens now. i haven't enabled the "SF repos" yet, but i will cause they've never given me problems in the past. i just wanted to report that little bit.

thanks again, sn68
 
Old 11-18-2006, 12:17 AM   #12
smad
LQ Newbie
 
Registered: Nov 2006
Posts: 4

Rep: Reputation: 0
work around

sorry post 1
 
Old 11-18-2006, 12:18 AM   #13
smad
LQ Newbie
 
Registered: Nov 2006
Posts: 4

Rep: Reputation: 0
sorry post 2
 
Old 11-18-2006, 12:19 AM   #14
smad
LQ Newbie
 
Registered: Nov 2006
Posts: 4

Rep: Reputation: 0
sorry post 3
 
Old 11-18-2006, 12:19 AM   #15
smad
LQ Newbie
 
Registered: Nov 2006
Posts: 4

Rep: Reputation: 0
My RHEL4 was broken and got the anoying python error!
I was able to correct the problem this way.

1- So first download on (http://linux.duke.edu/projects/yum)

>wget http://linux.duke.edu/projects/yum/d....2.2-1.src.rpm

2- Then remove the old installation and rebuild to old yum version (2.2.2.1)
>rpm -e yum
>rpmbuild --rebuild yum-2.2.2-1.src.rpm
>rpm -e python-urlgrabber
>rpm -i /usr/src/redhat/RPMS/noarch/yum-2.2.2-1.noarch.rpm

3- Update from DAG and play with /etc/yum.conf files

To add the DAG packages (prebuilt for RHEL4) repository to CentOS:
>cd /etc/yum.repos.d/
>wget http://soundlinuxtraining.com/portal.../misc/dag.repo

These packages are signed with a GPG key so you will need to import the key
( as root ).

>rpm --import http://dag.wieers.com/packages/RPM-GPG-KEY.dag.txt

If creating problem, comment all other repo's (in /etc/yum.conf and /etc/yum.repo.d/*.repo)

4- Update packages

>yum -y update --exclude=yum

Elsewhere, yum with urlgrabber will be updated and won't work again...
 
  


Reply

Tags
build, install, pirut, pup, python, rebuild, repo, repositories, rpm, uninstall, yum, yumex


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
"yum info python" gave me 2 installed items. Why? gneeot Linux - General 3 06-29-2006 02:07 AM
LXer: Move to python 2.4 / Changing the packaging style for python packages LXer Syndicated Linux News 0 06-13-2006 08:54 PM
FC4: Uninstalled python mistakenly - Yum too mailforbiz Linux - Newbie 4 01-25-2006 03:28 AM
Problem with Python? Yum? Daenris Linux - Software 1 04-08-2005 11:31 AM
Fedora + yum - rpm-python = :( BrokenBrick Linux - Software 1 03-11-2005 09:41 PM


All times are GMT -5. The time now is 01:50 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration