LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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 12-19-2007, 04:12 PM   #1
ufmale
Member
 
Registered: Feb 2007
Posts: 386

Rep: Reputation: 30
"no module named yum" problem


I don't find any good explanation of how to fix the
"No module named yum"

I am using Redhat Enterprise 4 and just install a bunch of redhat packages recommened by http://www.eth0.us/yum-rhel
python came with Redhat install is 2.3
Found some instruction on the web to import yum in the python command line, it seems to work.

yum was intalled using src.tar from the duke website. Neither yum 2.6 nor 2.4 work for me. It still show the same message "No module named yum"

This is how i install yum
Code:
$ make
       // does not look like it do anything
      $ make install
      // looks like to copy a bunch of files
Can anyone help?
 
Old 12-19-2007, 05:36 PM   #2
Lenard
Senior Member
 
Registered: Dec 2005
Location: Indiana
Distribution: RHEL/CentOS/SL 5 i386 and x86_64 pata for IDE in use
Posts: 4,790

Rep: Reputation: 58
Please read and follow this: http://wiki.centos.org/HowTos/Packag...ment/YumOnRHEL
 
Old 12-21-2007, 05:53 PM   #3
ufmale
Member
 
Registered: Feb 2007
Posts: 386

Original Poster
Rep: Reputation: 30
Installing redhat-yumconf-4-4.7.el4.nosrc.rpm does NOT work. it said incorrect format. Can you tell me the command use to install it?
 
Old 12-21-2007, 07:17 PM   #4
Lenard
Senior Member
 
Registered: Dec 2005
Location: Indiana
Distribution: RHEL/CentOS/SL 5 i386 and x86_64 pata for IDE in use
Posts: 4,790

Rep: Reputation: 58
To save the problem (there is an error in the spec file) all you need to have or create is the /etc/yum.repos.d directory.

If needed as root type: mkdir /etc/yum.repos.d

Then copy this file named CentOS-Base.repo into the directory;

Code:
# CentOS-Base.repo
#
# This file uses a new mirrorlist system developed by Lance Davis for CentOS.
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client.  You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the 
# remarked out baseurl= line instead.
#
#

[c4-base]
name=CentOS-4 - Base
mirrorlist=http://mirrorlist.centos.org/?release=4&arch=$basearch&repo=os
#baseurl=http://mirror.centos.org/centos/4/os/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4
includepkgs=yum python-elementtree python-sqlite python-urlgrabber sqlite sqlite-devel

#released updates 
[c4-update]
name=CentOS-4 - Updates
mirrorlist=http://mirrorlist.centos.org/?release=4&arch=$basearch&repo=updates
#baseurl=http://mirror.centos.org/centos/4/updates/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4
includepkgs=yum python-elementtree python-sqlite python-urlgrabber sqlite sqlite-devel

#packages used/produced in the build but not released
[c4-addons]
name=CentOS-4 - Addons
mirrorlist=http://mirrorlist.centos.org/?release=4&arch=$basearch&repo=addons
#baseurl=http://mirror.centos.org/centos/4/addons/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4

#additional packages that may be useful
[c4-extras]
name=CentOS-4 - Extras
mirrorlist=http://mirrorlist.centos.org/?release=4&arch=$basearch&repo=extras
#baseurl=http://mirror.centos.org/centos/4/extras/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4

#additional packages that extend functionality of existing packages
[c4-centosplus]
name=CentOS-4 - Plus
mirrorlist=http://mirrorlist.centos.org/?release=4&arch=$basearch&repo=centosplus
#baseurl=http://mirror.centos.org/centos/4/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4

#contrib - packages by Centos Users
[c4-contrib]
name=CentOS-4 - Contrib
mirrorlist=http://mirrorlist.centos.org/?release=4&arch=$basearch&repo=contrib
#baseurl=http://mirror.centos.org/centos/4/contrib/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4
Then to install from the CentOS repositories type something like;

yum install foo --enablerepo=c4*

A quick test: yum check-update --enablerepo=c4*
 
Old 01-02-2008, 04:26 PM   #5
ufmale
Member
 
Registered: Feb 2007
Posts: 386

Original Poster
Rep: Reputation: 30
Followed your instruction, but still cannot get it to work. Do you see any obvious problem from the following error?

# mkdir /etc/yum.repos.d
# cd yum.repos.d
[root@a1 yum.repos.d]# vi CentOS-Base.repo
[root@a1 yum.repos.d]# cd
[root@a1 ~]# yum check-update --enablerepo=c4

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.3.4 (#1, Feb 2 2005, 11:44:49)
[GCC 3.4.3 20041212 (Red Hat 3.4.3-9.EL4)]

If you cannot solve this problem yourself, please go to
the yum faq at:
http://wiki.linux.duke.edu/YumFaq
 
Old 01-02-2008, 05:33 PM   #6
lazlow
Senior Member
 
Registered: Jan 2006
Posts: 4,363

Rep: Reputation: 172Reputation: 172
There is a difference between c4 and c4*. Not sure if that is the only problem.
 
Old 01-02-2008, 05:45 PM   #7
ufmale
Member
 
Registered: Feb 2007
Posts: 386

Original Poster
Rep: Reputation: 30
tried both with and without *, and get the same error.
 
Old 01-02-2008, 07:53 PM   #8
lazlow
Senior Member
 
Registered: Jan 2006
Posts: 4,363

Rep: Reputation: 172Reputation: 172
Have you rebuilt the rpm per the instructions?
 
Old 01-03-2008, 10:38 AM   #9
ufmale
Member
 
Registered: Feb 2007
Posts: 386

Original Poster
Rep: Reputation: 30
i built from the src. Not sure how to build the rpm.src.
Remembered trying for other app, but does not seem to do anything..
is it just
$ rpmbuild yum.src.rpm?
do we need any install after that?
I am a newbie in Linux
 
Old 01-03-2008, 03:54 PM   #10
lazlow
Senior Member
 
Registered: Jan 2006
Posts: 4,363

Rep: Reputation: 172Reputation: 172
Just follow ALL the instructions in the link in post #2.
 
  


Reply



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
"ImportError: No module named gobject", Exaile fails to run. Python problem. kummiliim Linux - Software 1 12-11-2008 01:12 PM
Error " No module named rpmsack" while installing pidgin on RHEL 5 keeshan Linux - Software 13 12-18-2007 12:31 PM
broken yum - "No module named yum" shihab-alain Linux - Software 2 05-10-2006 05:09 AM
gDesklets in SuSE 10.0 - "ImportError: No module named os" slong682000 Linux - Software 2 04-10-2006 09:51 PM
Bittorrent. "ImportError: No module named __future__" BashTin Linux - Software 4 09-12-2005 03:07 AM

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

All times are GMT -5. The time now is 09:44 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
Open Source Consulting | Domain Registration