LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 05-24-2008, 10:17 PM   #1
braclayrab
LQ Newbie
 
Registered: May 2008
Posts: 14

Rep: Reputation: 0
Thumbs up Problem Installing Yum: "No module named yum"


Hi,
I'm somewhat new to *nix...
I'm trying to get Yum installed on my server.
I tried installing with rpm(I'm running CentOS) which some difficulty and finally got it to actually install but now I'm getting an error when I try to run yum:

Quote:
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

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, Mar 14 2007, 18:51:08)
[GCC 4.1.1 20070105 (Red Hat 4.1.1-52)]

If you cannot solve this problem yourself, please go to
the yum faq at:
http : //wiki.linux.duke.edu/YumFaq
Running "python" and trying "import yum" yields:

Quote:
Traceback (most recent call last):
File "<stdin>", line 1, in ?
ImportError: No module named yum
I've looked over a handful of other threads and have a tried numerous solutions but nothing has worked.
I'm not sure how to proceed...
Thanks!
 
Old 05-24-2008, 10:36 PM   #2
braclayrab
LQ Newbie
 
Registered: May 2008
Posts: 14

Original Poster
Rep: Reputation: 0
Ah, perhaps this is the root of the problem:
Quote:
$sudo rpm -Uvh yum-3.2.16-0.src.rpm --replacefiles
warning: yum-3.2.16-0.src.rpm: Header V3 DSA signature: NOKEY, key ID 69886cc7
Where can i find the keys?? I got the rpm from here: http : //linux.duke.edu/projects/yum/download/3.2/
 
Old 05-25-2008, 12:06 AM   #3
lazlow
Senior Member
 
Registered: Jan 2006
Posts: 4,362

Rep: Reputation: 171Reputation: 171
Ok, first: what version of centos are you running? Version 4 and greater should have yum installed by default.

2nd: You are trying to install a source rpm. That is what the ".src." means. What you want is the regular rpm (no .src. in the name).
 
Old 05-25-2008, 12:24 AM   #4
braclayrab
LQ Newbie
 
Registered: May 2008
Posts: 14

Original Poster
Rep: Reputation: 0
I figured out that I need the binary RPMs... I'm still having issues though. I cleaned out my old install of yum(which I had installed by running 'make install' from the src rpms) and installed the binary rpm from pbone.net along with a bunch of dependencies but I'm still getting the same error.



Quote:
[clay@cynicsymposium yum]$sudo rpm -ivh yum-2.4.2-0.4.el4.rf.noarch.rpm
warning: yum-2.4.2-0.4.el4.rf.noarch.rpm: Header V3 DSA signature: NOKEY, key ID 6b8d79e6
Preparing... ########################################### [100%]
1:yum ########################################### [100%]
[clay@cynicsymposium yum]$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 yum

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, Mar 14 2007, 18:51:08)
[GCC 4.1.1 20070105 (Red Hat 4.1.1-52)]

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


[clay@cynicsymposium yum]$

Last edited by braclayrab; 05-25-2008 at 12:28 AM.
 
Old 05-25-2008, 12:27 AM   #5
braclayrab
LQ Newbie
 
Registered: May 2008
Posts: 14

Original Poster
Rep: Reputation: 0
Lazlow,
I believe I'm running CentOS 4...
Quote:
[clay@cynicsymposium ~]$cat /proc/version
Linux version 2.6.9-023stab046.2-enterprise (root@rhel4-32) (gcc version 3.4.5 2 0051201 (Red Hat 3.4.5-2)) #1 SMP Mon Dec 10 15:22:33 MSK 2007
It did not have yum installed by default...

Last edited by braclayrab; 05-25-2008 at 12:29 AM.
 
Old 05-25-2008, 12:35 AM   #6
lazlow
Senior Member
 
Registered: Jan 2006
Posts: 4,362

Rep: Reputation: 171Reputation: 171
Take a look at /etc/redhat-release. That SHOULD tell you for sure. I suspect that you are running RHEL (Red Hat Enterprise Linux). While the two are very close you do have to jump through a couple of hoops to run yum on RHEL4 (RHEL5 uses it by default).
 
Old 05-25-2008, 12:35 AM   #7
braclayrab
LQ Newbie
 
Registered: May 2008
Posts: 14

Original Poster
Rep: Reputation: 0
s***, nevermind...
Quote:
[clay@cynicsymposium proc]$cat /etc/issue
CentOS release 5 (Final)
Kernel \r on an \m

[clay@cynicsymposium proc]$
edit:
also
Quote:
[clay@cynicsymposium proc]$cat /etc/redhat-release
CentOS release 5 (Final)
[clay@cynicsymposium proc]$

Last edited by braclayrab; 05-25-2008 at 12:36 AM.
 
Old 05-25-2008, 12:56 AM   #8
braclayrab
LQ Newbie
 
Registered: May 2008
Posts: 14

Original Poster
Rep: Reputation: 0
Woohoo!!
Thanks a ton Lazlow
I just had the wrong rpms(again).
I uninstalled all the CentOS 4 packages I had installed before(rpm -e) and then grabbed all the CentOS 5 ones!
Thank you!!!!
 
Old 06-11-2009, 05:11 AM   #9
chingon27
LQ Newbie
 
Registered: Jun 2009
Posts: 1

Rep: Reputation: 0
Quote:
Originally Posted by braclayrab View Post
[clay@cynicsymposium yum]$sudo rpm -ivh yum-2.4.2-0.4.el4.rf.noarch.rpm
warning: yum-2.4.2-0.4.el4.rf.noarch.rpm: Header V3 DSA signature: NOKEY, key ID 6b8d79e6
Preparing... ########################################### [100%]
1:yum ########################################### [100%]
[clay@cynicsymposium yum]$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 yum

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, Mar 14 2007, 18:51:08)
[GCC 4.1.1 20070105 (Red Hat 4.1.1-52)]

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


[clay@cynicsymposium yum]$

had the exact same problem. I played with different rpm versions of python and python-devel and rpm-python. Here's what worked for me.

versions I had installed:
python-2.4.3-21.el5
python-devel-2.4.3-21.el5.i386

changed to:
python-2.4.3-24.el5.i386.rpm
python-devel-2.4.3-24.el5.i386.rpm

note:
I tried using
rpm-python-4.4.2.3-9.el5.i386.rpm
but it didn't work. I had to change it back to
rpm-python-4.4.2-48.el5.i386.rpm

Good luck.versions I had installed:
python-2.4.3-21.el5
python-devel-2.4.3-21.el5.i386

upgraded to:
python-2.4.3-24.el5.i386.rpm
python-devel-2.4.3-24.el5.i386.rpm

note:
I tried using
rpm-python-4.4.2.3-9.el5.i386.rpm
but had to rollback to
rpm-python-4.4.2-48.el5.i386.rpm

Hope it works for you.
 
Old 08-04-2009, 06:57 PM   #10
techdruid
LQ Newbie
 
Registered: Apr 2009
Location: Portland, OR
Posts: 10

Rep: Reputation: 0
No module named yum after Fedora 10 to 11 upgrade

This problem, although detailed with other linux distributions, seems to also exist when upgrading from Fedora 10 to 11.

I ended up having to download the yum RPM's for Fedora 11 manually, and install them using RPM.

I also encountered the following error immediately upon booting into Fedora 11.
Code:
Traceback (most recent call last):
  File "/usr/sbin/yum-updatesd" . line 41. in <module>
    from yum.config import BaseConfig. Option, IntOption, ListOption, BoolOption
ImportError: No module name yum.config
Full details on my errors and the fix can be found here.
http://www.techdruid.com/index.php/c...dule-named-yum
 
  


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
problem in installing softwares in fedora8 .. unable to use "yum" shashank24 Linux - Software 1 02-14-2008 04:07 PM
Difference betweenn "yum install" and "yum update" john lee Linux - Newbie 1 02-11-2008 11:26 PM
"no module named yum" problem ufmale Linux - Software 9 01-03-2008 03:54 PM
YUM no module named yum gimmee Fedora 7 12-06-2006 03:43 PM
broken yum - "No module named yum" shihab-alain Linux - Software 2 05-10-2006 05:09 AM


All times are GMT -5. The time now is 09:37 PM.

Main Menu
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