Solved

Can't use 'yum' in Linux

Posted on 2009-04-08
10
1,285 Views
Last Modified: 2012-05-06
A long time ago in a place far far away I remember using yum to install lots of stuff and it worked great, but now I am trying it again on my own server and it's not working. Linux does not recognize 'yum' and when I try to install the RPM package I get the following error:

[root@supersecret /]# rpm -Uvh yum*.noarch.rpm
warning: yum-2.0.3-0.fdr.1.rh90.noarch.rpm: Header V3 DSA signature: NOKEY, key ID 8df56d05
error: Failed dependencies:
        rpm-python >= 0:4.1.1 is needed by yum-2.0.3-0.fdr.1.rh90.noarch
        yum < 3.2.0 conflicts with yum-metadata-parser-1.1.2-2.el5.x86_64

I have a feeling I am looking at it the wrong way somehow but I can't figure out what. My linux version is the following:

[root@supersecret /]# cat /proc/version
Linux version 2.6.9-023stab048.4-smp (root@rhel4-64) (gcc version 3.4.5 20051201 (Red Hat 3.4.5-2)) #1 SMP Fri Jul 11 18:00:55 MSD 2008

I remember getting the error that gcc couldn't be found either while trying to install different packages, but here it says a gcc version number? I am totaly lost, any help would be very greatly appreciated, thanks experts!
0
Comment
Question by:bt33
10 Comments
 
LVL 3

Expert Comment

by:GarthSnyder
ID: 24103411
The gcc version reported by /proc/version relates to the build environment of your kernel, so it doesn't necessarily indicate anything about software installed on the system.

The fact that you are getting a message about conflicts with the installed yum metadata parser makes me wonder if yum isn't already installed. What does "rpm -q yum" tell you? What about "whereis yum"? Is it possible that your PATH environment variable isn't set through /usr/bin?
0
 
LVL 7

Expert Comment

by:Thomas Wheeler
ID: 24103485
RedHat EL 3 uses up2date is this not working for you?
0
 

Author Comment

by:bt33
ID: 24107943
[root@supersecret ~]# up2date
-bash: up2date: command not found
[root@supersecret ~]# rpm -q yum
package yum is not installed
[root@supersecret ~]# whereis yum
yum:
[root@supersecret ~]# echo $PATH
//sbin://bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin

All bad news it seems :(
0
 
LVL 2

Accepted Solution

by:
zencrafter earned 500 total points
ID: 24109982
It's RHEL 4, not RHEL 3.  That 3.4.5-2 version number listed there for RedHat is for the version of gcc used to compile the kernel.  RHEL 4 uses gcc-3.4.x.  The RHEL version is also indicated by the email address in the string (root@rhel4-64)  gcc-3.4.6-9 is the most recent update for RHEL 4.

That first error told you the problem.  You're trying to install an incompatible version of yum.  
If you want to use yum instead of up2date, you're going to need to point yourself to a CentOS 4 yum repository to get RPMs compatible with your RHEL 4 build.  Redhat doesn't maintain a yum repository.  They want you to use up2date and pay for access/support.

To use up2date, you'll need to install it from your CD/DVD you originally used, or log into your RedHat Network (RHN) account and download/install it from there.

up2date also requires that the system being updated be registered with the RHN.  There would have been a license key that you received via email (if you purchased the entitlement online), or on a white card inside the box that contained the installation CD/DVD's.  If you didn't purchase an entitlement, you'll need to buy one or switch to yum for your updates.

If you want to use yum with a RHEL-based distro, you should really be using CentOS or Fedora Core instead.  It's relatively easy to jump ship and convert in place without reinstalling the entire OS:

Download the following RPMs to a some directory on your machine:

http://isoredirect.centos.org/centos/4/os/x86_64/CentOS/RPMS/centos-release-4-7.x86_64.rpm
http://isoredirect.centos.org/centos/4/os/x86_64/CentOS/RPMS/yum-2.4.3-4.el4.centos.noarch.rpm
http://isoredirect.centos.org/centos/4/os/x86_64/CentOS/RPMS/yum-metadata-parser-1.0-8.el4.centos.x86_64.rpm
http://isoredirect.centos.org/centos/4/os/x86_64/CentOS/RPMS/python-elementtree-1.2.6-5.el4.centos.x86_64.rpm
http://isoredirect.centos.org/centos/4/os/x86_64/CentOS/RPMS/python-sqlite-1.1.7-1.2.1.x86_64.rpm
http://isoredirect.centos.org/centos/4/os/x86_64/CentOS/RPMS/python-urlgrabber-2.9.8-2.noarch.rpm
http://isoredirect.centos.org/centos/4/os/x86_64/CentOS/RPMS/sqlite-3.3.6-2.x86_64.rpm
http://isoredirect.centos.org/centos/4/os/x86_64/RPM-GPG-KEY-centos4

If isodirect.centos.org doesn't work for you, you can visit www.centos.org and find another mirror that does.

Remove the incompatible version of yum-metadata-parser before proceeding:

rpm -e yum-metadata-parser

Now, run the following commands from the same directory as your downloaded RPMs:

rpm import RPM-GPG-KEY-centos4
rpm -e nodeps redhat-release
rpm -Uvh *.rpm

After this, you've made the conversion to CentOS4.  Now just run the following to get the latest updates:

yum upgrade
0
Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

 
LVL 2

Expert Comment

by:zencrafter
ID: 24110017
Looks like experts-exchange doesn't like double dashes.  The import and nodeps options have 2 dashes in front of them, instead of just 1 like for -e.
0
 

Author Comment

by:bt33
ID: 24110875
I get this:

[root@supersecret /]# rpm -e --nodeps redhat-release
error: package redhat-release is not installed

And I'm guessing because that didn't work I can't use the last command because of the dependencies.

[root@supersecret /]# rpm -Uvh *.rpm
error: Failed dependencies:
        python-abi = 2.3 is needed by python-elementtree-1.2.6-5.el4.centos.x86_64
        libreadline.so.4()(64bit) is needed by sqlite-3.3.6-2.x86_64
        rpm-python is needed by yum-2.4.3-4.el4.centos.noarch

I rented this server so I didn't install RedHat myself, it's basicly a cheap server where I can roam free as root but with little to no support.
0
 
LVL 2

Expert Comment

by:zencrafter
ID: 24112662
Go here and download the missing packages:

http://isoredirect.centos.org/centos/4/os/x86_64/CentOS/RPMS/


0
 

Author Comment

by:bt33
ID: 24115343
When I try to install the missing packages I get dependency erros again, and so on and on. Isn't it weird that I would need to install all rpm's? I found a list of rpm's my provider claims to have installed on the server:

http://www.flexservers.nl/vps/rpm-packages-centos5.php

Is it maybe something else or should I just install all the rpm's the server asks for? (which are a loooot)
0
 
LVL 2

Expert Comment

by:zencrafter
ID: 24116804
Based on that package list, it looks like your provider is using OpenVZ as a virtual hosting/machine mechanism.  Since it looks like your distro is really RedHat and not CentOS, I'd recommend contacting your hosting support for assistance in updating your virtual's RPMs, as they have not given you the mechanism to do so on your own.
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This is the error message I got (CODE) Error caused by incompatible libmp3lame 3.98-2 with ffmpeg I've googled this error message and found out sometimes it attaches this note "can be treated with downgrade libmp3lame to version 3.97 or 3.98" …
rdate is a Linux command and the network time protocol for immediate date and time setup from another machine. The clocks are synchronized by entering rdate with the -s switch (command without switch just checks the time but does not set anything). …
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

914 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now