LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
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-31-2010, 04:04 AM   #1
mosen81
LQ Newbie
 
Registered: May 2010
Location: Malaysia
Distribution: RedHat EL5 and Ubuntu
Posts: 8

Rep: Reputation: 0
yum corrupted


Hi, im new to Linux. Right now im doing some development in RedHat EL5. I cant use yum to install any package or update. Everytime i typed yum the error is:

Traceback (most recent call last):
File "/usr/bin/yum", line 28, in ?
import yummain
File "/usr/share/yum-cli/yummain.py", line 30, in ?
from yum import _
ImportError: cannot import name _

I cant even run "yum clean metadata". I've dowloaded and installed yum-3.2.27 but the problem is still the same.

This is my yum.conf:

[main]
cachedir=/var/cache/yum
keepcache=0
debuglevel=2
logfile=/var/log/yum.log
exactarch=1
obsoletes=1
gpgcheck=1
plugins=1
installonly_limit=3

Need some step by step help as im totally new to this. Thanks in advance.
 
Old 05-31-2010, 05:03 AM   #2
alli_yas
Member
 
Registered: Apr 2010
Location: Johannesburg
Distribution: Fedora 14, RHEL 5.5, CentOS 5.5, Ubuntu 10.04
Posts: 559

Rep: Reputation: 92
Hi

Welcome to LQ!

I suggest you read the LQ Rules and "How to ask questions the smart way" which can be found on the Forum home page.

Regarding your question/s:

Quote:
Need some step by step help as im totally new to this. Thanks in advance
This is not how LQ works - here we believe in helping people to educate themselves; not to give step by step guides to doing things. So by all means attempt to solve your problem and at each stumbling block we will help you as best we can.

Regarding the yum issue that you're experiencing; I have 2 comments/suspicions:

1. You should not have downloaded and installed version 3.2.27 of yum - the latest supported version of yum for RHEL is version 3.2.22. Installing an unsupported package can have implications to your support agreement with Red Hat.

2. Based on your output, it appears that some of the dependencies for yum are missing - take a look at this for a user who had a similar experience: http://old.nabble.com/yum-error-Impo...d18624933.html
 
Old 05-31-2010, 11:37 AM   #3
lazlow
Senior Member
 
Registered: Jan 2006
Posts: 4,362

Rep: Reputation: 172Reputation: 172
Mosen

When you are working on an RPM based distro it is best NOT to install from source. The packages are just too tightly integrated. IF you wish to build you own applications(or whatever) learn how to build RPMs and install the RPM instead of installing source. The reason for this is that when you install from source the RPM db does not know about what you installed, it just knows about RPMs. The problem arises when the RPM versions of packages(not necessary related to what you are doing) start calling for things that you have installed via source. Now if the source version does not behave EXACTLY as the RPM version you are superseding, it can (and does) cause problems. Depending on what you have installed this can snowball into a huge mess in very short order. One would think that one could just use the uninstall script from the source that you built from, unfortunately this seldom works. If you build the RPM, rather than just installing it from source, and a conflict arises the package manager is then able to completely remove the offending package(usually without much of an issue).

Edit: You should also tell us what version of el5 you are running(5.0-5.5 are currently choices) and what arch you are using(i386,x64, etc), whenever you ask a question.

Last edited by lazlow; 05-31-2010 at 11:38 AM.
 
Old 05-31-2010, 08:05 PM   #4
mosen81
LQ Newbie
 
Registered: May 2010
Location: Malaysia
Distribution: RedHat EL5 and Ubuntu
Posts: 8

Original Poster
Rep: Reputation: 0
Thanks for the advices. Added info; the RedHat version is "Linux version 2.6.18-8.el5" and using i386 archi.
 
Old 05-31-2010, 10:35 PM   #5
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,090

Rep: Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474
for red hat you NEED to but a support license .This enables you to install the red hat updates and access to the red hat software repos.
pay red hat and ask them
----- OR ---------
install CentOS 5.5
Cent is a community supported version of red hat
 
Old 05-31-2010, 10:41 PM   #6
mosen81
LQ Newbie
 
Registered: May 2010
Location: Malaysia
Distribution: RedHat EL5 and Ubuntu
Posts: 8

Original Poster
Rep: Reputation: 0
I just did "rpm -Uvh --force yum-3.2.22-4.el5.noarch.rpm" and yum is back on track. Thanks all.
 
Old 05-31-2010, 10:44 PM   #7
lazlow
Senior Member
 
Registered: Jan 2006
Posts: 4,362

Rep: Reputation: 172Reputation: 172
mosen81

Post the results of:
Quote:
cat /etc/redhat-release
What you posted(2.6.18-8.el5) is just the kernel version. I suspect that you are still running 5.0 while the current is 5.5. Just to give you an idea how far behind you are the current kernel is 2.6.18-194.3.1.el5 and new kernels do not come out very often on el5. There is a ton of fixes between -8 and -194. John VV is correct in that you cannot access any RHEL updates unless you pay the subscription. If you do not wish to pay then switching to Centos is a VERY good idea.
 
Old 05-31-2010, 11:11 PM   #8
mosen81
LQ Newbie
 
Registered: May 2010
Location: Malaysia
Distribution: RedHat EL5 and Ubuntu
Posts: 8

Original Poster
Rep: Reputation: 0
[root@localhost /]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 5 (Tikanga)

Unfortunately this machine is not my personal. Its a company server that being provided for us to develop subversion system, reviewboard etc. I cant afford to pay or change it to CentOS.
 
Old 06-01-2010, 12:40 AM   #9
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,090

Rep: Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474
mosen81 if your company can not be bothered to pay for the last aprox. 2 years of security updates then your system will/ or is / "cracked"
some cracker will have control over it .
 
0 members found this post helpful.
Old 06-06-2010, 05:03 PM   #10
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,353
Blog Entries: 55

Rep: Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541
Do not do that again!

Quote:
Originally Posted by John VV View Post
mosen81 if your company can not be bothered to pay for the last aprox. 2 years of security updates then your system will/ or is / "cracked"
some cracker will have control over it .
Unless you have access to any "evidence" we don't I strongly suggest you keep from making claims like that as it's close to posting FUD.
 
  


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 tg3793 Fedora 8 04-13-2011 11:25 AM
Ubuntu 9.x install corrupted NTFS partition; repair corrupted TrueCrypt partition halfer Linux - General 1 06-30-2009 02:59 PM
How to set console font (corrupted after yum update) eagleheart Red Hat 1 03-11-2009 12:16 PM
problem after yum yum yum (delicious) alaios Fedora 3 01-14-2009 02:34 AM
my amarok is corrupted ,insatlled via yum, how can i repair amolgupta Linux - Software 1 07-27-2006 03:04 AM


All times are GMT -5. The time now is 10:12 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration