LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 10-23-2009, 10:27 PM   #1
com4host.com
LQ Newbie
 
Registered: Oct 2009
Posts: 4

Rep: Reputation: 0
Question I have a problem With yum


Hi.
I have a problem With yum

[~]# yum update
Traceback (most recent call last):
File "/usr/bin/yum", line 28, in ?
import yummain
ImportError: No module named yummain

distro running CentOS 5 32Bit
# uname -r
2.6.18-92.1.13.el5.028stab059.6



I hope to find help

Thank you.
 
Old 11-03-2009, 01:30 PM   #2
jphilput
Member
 
Registered: Nov 2007
Posts: 58

Rep: Reputation: 15
It looks like something has happened that is preventing Yum from accessing the information stored in /usr/share/yum-cli. There should be 3 files in that directory that have yummain in their names.

/usr/share/yum-cli/yummain.py
/usr/share/yum-cli/yummain.pyc
/usr/share/yum-cli/yummain.pyo

If these files are missing, then I would suggest reinstalling yum from a new set of RPMs. I have four yum related packages installed by default on my Centos 5 box, so if you reinstall Yum you may want to go ahead and pull these four packages.

yum
yum-fastestmirror
yum-metadata-parser
yum-updatesd
 
Old 11-04-2009, 02:28 AM   #3
com4host.com
LQ Newbie
 
Registered: Oct 2009
Posts: 4

Original Poster
Rep: Reputation: 0
hi jphilput
can you help me for reinstalling yum

Thank you.
 
Old 11-06-2009, 08:26 AM   #4
jphilput
Member
 
Registered: Nov 2007
Posts: 58

Rep: Reputation: 15
I can give you some help with this, but if you don't already know how to add and remove packages without Yum, then I strongly recommend having and experienced systems administrator help with this. Removing and reinstalling Yum will, at least temporarily, break things. Everything *should* work fine after the reinstall, but it is possible that something else will break along the way. If you are not comfortable adding and removing packages, or do not have a lot of experience with Linux, I suggest that you get one of your local systems administrators to assist you before continuing with these instructions. If you do this wrong, you could potentially make your system inoperable.

Before you begin, you need to read and understand the RPM man page. RPM is the tool to use to manually add and remove packages.

First, we can try to manually update the yum packages and see if that solves the problem. Make sure you have downloaded the latest copies of the 4 files that I mentioned in my previous post, yum, yum-fastestmirror, yum-metadata-parser, and yum-updatesd. Once you have the latest files, run the following command as root:

# rpm -Uvh yum yum-fastestmirror yum-metadata-parser yum-updatesd

The command may generate errors, if it does, do your best to resolve them by downloading more up to date versions of the dependent packages, and adding them to the install command above. Once the command is run successfully, you should be able to use Yum. If you are still seeing the same error, then you will need to remove the existing Yum packages and reinstall them. Again, this should only be done as a last resort, with an experienced Linux systems administrator nearby and ready to help if things go badly. The following command will erase the Yum packages and alert you to any dependencies that will prevent the removal. During the test phase, DO NOT run this command as root, use a regular user account.

$ rpm -ev yum yum-fastestmirror yum-metadata-parser yum-updatesd

At this point there should be a list of dependencies that will be broken by making this change. You will need to download RPMs for each of the listed dependencies and add them to the rpm -ev command. Once it has stopped listing dependencies, su to Root, and run the completed command. Once it finishes running, you will need to run the following command to reinstall all of the packages that you removed. Make sure to add the dependencies to the end of the command.

# rpm -ivh yum yum-fastestmirror yum-metadata-parser yum-updatesd

Once everything is reinstalled, Yum should function normally.
 
Old 11-07-2009, 07:39 AM   #5
com4host.com
LQ Newbie
 
Registered: Oct 2009
Posts: 4

Original Poster
Rep: Reputation: 0
when can i download the latest copies of the 4 files ?

Thank you to help me.
 
Old 11-07-2009, 08:44 AM   #6
com4host.com
LQ Newbie
 
Registered: Oct 2009
Posts: 4

Original Poster
Rep: Reputation: 0
when can i download the latest copies of the 4 files ?

Thank you to help me.
 
Old 11-09-2009, 09:33 AM   #7
jphilput
Member
 
Registered: Nov 2007
Posts: 58

Rep: Reputation: 15
First, based on the questions that you have asked so far, I don't think that you should be the one to follow the instructions I've given here. Your username seems to indicate that you work for a hosting company. I think that you need to involve one of your systems administrators at this time.

In answer to your question, you can and should get the files from the same place that you downloaded CentOS.
 
  


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 install flash ... yum: command not found ... which yum ... /usr/bin/yum tg0000 Fedora 8 04-13-2011 11:25 AM
problem when run yum (No module named yum) ezak Linux - Distributions 4 10-16-2009 04:04 AM
yum header/pidof yum problem yohmie Fedora 3 03-24-2009 07:54 AM
problem after yum yum yum (delicious) alaios Fedora 3 01-14-2009 02:34 AM
Yum Problem - /var/cache/yum/base/primary.xml.gz:1 ice99 Linux - Software 0 12-15-2005 01:08 PM

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

All times are GMT -5. The time now is 03:37 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