LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-24-2010, 02:58 PM   #1
vitasis
LQ Newbie
 
Registered: Mar 2010
Distribution: ubuntu
Posts: 12

Rep: Reputation: 0
yum and No module named CElementTree


I installed something and now my yum dont 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 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, Sep 3 2009, 15:37:12)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-46)]

i use CentOS release 5.4 (2.6.18-164.2.1.el5.028stab066.7 #1 SMP Tue Dec 1 23:22:32 EET 2009 i686 i686 i386 GNU/Linux) on my VPS.

# rpm -qa --last shows:

python-elementtree-1.2.6-5 Wed 24 Mar 2010 12:56:46 PM EET
rpmforge-release-0.5.1-1.el3.rf Wed 24 Mar 2010 08:20:32 AM EET
perl-Convert-ASN1-0.22-1.el3.rf Wed 24 Mar 2010 08:20:31 AM EET
rsync-3.0.7-1.el3.rf Wed 24 Mar 2010 08:20:30 AM EET
gpg-pubkey-e42d547b-3960bdf1 Wed 24 Mar 2010 08:15:57 AM EET
gpg-pubkey-6b8d79e6-3f49313d Wed 24 Mar 2010 08:15:57 AM EET
gpg-pubkey-1aa78495-3eb24301 Wed 24 Mar 2010
08:15:57 AM EET

also # rpm -q yum -> yum-3.2.22-20.el5.centos
# rpm -q python -> python-2.4.3-27.el5
rpm -q python-elementtree -> python-elementtree-1.2.6-7.el5.rf

i think that this problem are with python, how solve this problem? I dont want reinstall VPS.
 
Old 04-07-2010, 12:28 PM   #2
qlue
Member
 
Registered: Aug 2009
Location: Umzinto, South Africa
Distribution: Crunchbangified Debian 8 (Jessie)
Posts: 747
Blog Entries: 1

Rep: Reputation: 172Reputation: 172
Since the problem shows that you don't have the CElementTree module, I'd suggest you install an RPM that has that module.
You can try this one.
http://rpm.pbone.net/index.php3/stat....i386.rpm.html
I'm not sure if that will help but it's what I'd do in that situation.
I suspect that the required module is not available in you repositories. So you may be able to solve your problem by adding a suitable repository.
 
Old 04-09-2010, 02:22 PM   #3
vitasis
LQ Newbie
 
Registered: Mar 2010
Distribution: ubuntu
Posts: 12

Original Poster
Rep: Reputation: 0
I still have this problem. Maybe you can exactly say what to do and how can i solve this problem this yum?
 
Old 04-10-2010, 08:24 PM   #4
qlue
Member
 
Registered: Aug 2009
Location: Umzinto, South Africa
Distribution: Crunchbangified Debian 8 (Jessie)
Posts: 747
Blog Entries: 1

Rep: Reputation: 172Reputation: 172
My suggestion is, go to the page in the link. Download the rpm package there. Then, on you computer, goto downloads with your file browser and double click on the package you downloaded to install it. Then test to see if yum is working.
you can also find rpm packages for most things at that site if a particular package you need isn't yummable.
disclaimer: although I have used that site without problems in the past. I do have anything to do with that site and I cant be held responsible for any badwear you might get from there.
 
Old 04-10-2010, 10:22 PM   #5
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,590

Rep: Reputation: 2643Reputation: 2643Reputation: 2643Reputation: 2643Reputation: 2643Reputation: 2643Reputation: 2643Reputation: 2643Reputation: 2643Reputation: 2643Reputation: 2643
Quote:
I installed something and now my yum dont work:
What did you install??????
Quote:
rpmforge-release-0.5.1-1.el3.rf
you do know that rf is incompatible with almost every other cent repo !!!!!
If you use rf then YOU ONLY use rf .
by incompatible i mean that rf can KILL a cent install if you are not VERY VERY careful
 
Old 04-11-2010, 01:34 AM   #6
vitasis
LQ Newbie
 
Registered: Mar 2010
Distribution: ubuntu
Posts: 12

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by John VV View Post
What did you install??????

you do know that rf is incompatible with almost every other cent repo !!!!!
If you use rf then YOU ONLY use rf .
by incompatible i mean that rf can KILL a cent install if you are not VERY VERY careful
So how to fix now yum and my system? In my /etc/yum.repos.d i have:
-rw-r--r-- 1 root root 2323 Mar 17 2009 CentOS-Base.repo
-rw-r--r-- 1 root root 626 Oct 1 2009 CentOS-Media.repo
-rw-r--r-- 1 root root 190 Feb 2 19:11 vz.repo

if i run: rpm -qa | grep rpmforge i can't find anything... and if i run python and type import yum i have this error:

Python 2.4.3 (#1, Sep 3 2009, 15:37:12)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-46)] 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 49, in ?
import comps
File "/usr/lib/python2.4/site-packages/yum/comps.py", line 22, in ?
import CElementTree
ImportError: No module named CElementTree
>>>
 
Old 04-11-2010, 02:32 AM   #7
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,590

Rep: Reputation: 2643Reputation: 2643Reputation: 2643Reputation: 2643Reputation: 2643Reputation: 2643Reputation: 2643Reputation: 2643Reputation: 2643Reputation: 2643Reputation: 2643
why are you trying to run yum from python ?

to see what repos are installed run thin
Code:
yum repolist all
from a normal bash terminal
you might want to read the ceno os wiki
http://wiki.centos.org/
and the page for adding repos
http://wiki.centos.org/AdditionalResources/Repositories

as to fixing ????
it looks like this might have been the problem
"python-elementtree"

yum uses python and any change to it ( outside of what is in the centOS repo) can and will mess it up.

--
also why did you try to install this

rpmforge-release-0.5.1-1.el3.rf
perl-Convert-ASN1-0.22-1.el3.rf
rsync-3.0.7-1.el3.rf
the "el3" means it is for RHEL 3 NOT RHEL 5
this is FOR CENT 3 " rpmforge-release-0.5.1-1.el3.rf" NOT CentOS 5.4
--
and the rpm search would be for *.rt
Code:
rpm -qa | grep .rt
if you did manage to install a bunch of cent 3 programs on cent 5 it might NOT be fixable
uninstall any rf and ALL el3 rpm's
 
Old 04-11-2010, 07:55 AM   #8
vitasis
LQ Newbie
 
Registered: Mar 2010
Distribution: ubuntu
Posts: 12

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by John VV View Post
why are you trying to run yum from python ?

to see what repos are installed run thin
Code:
yum repolist all
from a normal bash terminal
you might want to read the ceno os wiki
http://wiki.centos.org/
and the page for adding repos
http://wiki.centos.org/AdditionalResources/Repositories

as to fixing ????
it looks like this might have been the problem
"python-elementtree"

yum uses python and any change to it ( outside of what is in the centOS repo) can and will mess it up.

--
also why did you try to install this

rpmforge-release-0.5.1-1.el3.rf
perl-Convert-ASN1-0.22-1.el3.rf
rsync-3.0.7-1.el3.rf
the "el3" means it is for RHEL 3 NOT RHEL 5
this is FOR CENT 3 " rpmforge-release-0.5.1-1.el3.rf" NOT CentOS 5.4
--
and the rpm search would be for *.rt
Code:
rpm -qa | grep .rt
if you did manage to install a bunch of cent 3 programs on cent 5 it might NOT be fixable
uninstall any rf and ALL el3 rpm's
i cant run yum repolist all, i get the same error:

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, Sep 3 2009, 15:37:12)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-46)]

If you cannot solve this problem yourself, please go to
the yum faq at:
http://wiki.linux.duke.edu/YumFaq


i uninstalled all .rf and el3 rpm's, but i still have the same error when i want run yum. Maybe i need reinstall python or yum? Or change some python files?
 
Old 04-11-2010, 05:16 PM   #9
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,590

Rep: Reputation: 2643Reputation: 2643Reputation: 2643Reputation: 2643Reputation: 2643Reputation: 2643Reputation: 2643Reputation: 2643Reputation: 2643Reputation: 2643Reputation: 2643
you will also need to reinstall EVERY rt and el3 rpm with the correct el5 rpm from the Cent repo


by making changes to python and installing the wrong ( el3) rpm's the system might be beyond help.

we would need to see just how many and what were installed
the output from rpm would be nice
Code:
rpm -qa | grep rt
-- and this --
rpm -qa | grep el3
if more than two or 3 *.el3 rpm's were installed the computer might not be fixable.
But it also depends on what the packages are
if one of the rt's ( or el3's)were a critical system files ...
This is not easily fixed .
 
Old 04-12-2010, 12:19 PM   #10
vitasis
LQ Newbie
 
Registered: Mar 2010
Distribution: ubuntu
Posts: 12

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by John VV View Post
you will also need to reinstall EVERY rt and el3 rpm with the correct el5 rpm from the Cent repo


by making changes to python and installing the wrong ( el3) rpm's the system might be beyond help.

we would need to see just how many and what were installed
the output from rpm would be nice
Code:
rpm -qa | grep rt
-- and this --
rpm -qa | grep el3
if more than two or 3 *.el3 rpm's were installed the computer might not be fixable.
But it also depends on what the packages are
if one of the rt's ( or el3's)were a critical system files ...
This is not easily fixed .
there is no output for rpm -qa | grep rt -- and this -- rpm -qa | grep el now.

maybe i need change some python files or reinstall it? How to fix my system?
 
Old 04-12-2010, 03:13 PM   #11
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,590

Rep: Reputation: 2643Reputation: 2643Reputation: 2643Reputation: 2643Reputation: 2643Reputation: 2643Reputation: 2643Reputation: 2643Reputation: 2643Reputation: 2643Reputation: 2643
the rt is a typo it is rf ( rpmforge)

what do you mean there is no out put for these two commands you DID install some files for red hat 3 and some files from rpmforge
Quote:
rpmforge-release-0.5.1-1.el3.rf Wed 24 Mar 2010 08:20:32 AM EET

Last edited by John VV; 04-12-2010 at 03:16 PM.
 
Old 04-13-2010, 02:36 PM   #12
vitasis
LQ Newbie
 
Registered: Mar 2010
Distribution: ubuntu
Posts: 12

Original Poster
Rep: Reputation: 0
I already fixed yum.
 
Old 09-08-2010, 04:45 AM   #13
prateek_linux
LQ Newbie
 
Registered: Sep 2010
Posts: 1

Rep: Reputation: 0
Quote:
Originally Posted by vitasis View Post
I already fixed yum.
Hey Vitasis,
I am a newbie to linux and getting the same problem as yours.
Can you tell me how you fixed your yum.
Please.
 
  


Reply


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 - cElementTree - Python WhatsOnYourBrain Fedora 17 03-24-2011 09:32 AM
problem when run yum (No module named yum) ezak Linux - Distributions 4 10-16-2009 04:04 AM
No module named rpm centos 4 yum dutchy88 Red Hat 6 01-25-2009 03:26 PM
yum error: no module named rpm catbird Linux - Newbie 4 02-21-2008 09:55 AM
YUM no module named yum gimmee Fedora 7 12-06-2006 03:43 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:51 AM.

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
Open Source Consulting | Domain Registration