I am new to Linux and trying to install gcc on my Red Hat Enterprise Linux using the yum package installer. However I receive the following error - can you help me out?

[root@localhost root]# yum install gcc
Gathering header information file(s) from server(s)
Server: CentOS-9 - Base
Server: Red Hat Linux 9 - Updates
Finding updated packages
Downloading needed headers
Resolving dependencies
....Package compat-libstdc++-devel needs compat-libstdc++ = 7.3-2.96.118, this is not available.
Package compat-gcc-c++ needs compat-libstdc++ = 7.3, this is not available.
[root@localhost root]# rpm -ivh compat-libstdc++-7.3-2.96.118.i386.rpm
Preparing...                ########################################### [100%]
    package compat-libstdc++-7.3-2.96.118 is already installed

My yum.conf file:

[main]
cachedir=/var/cache/yum
debuglevel=2
logfile=/var/log/yum.log
pkgpolicy=newest
distroverpkg=redhat-release
tolerant=1
exactarch=1

[base]
name=CentOS-$releasever - Base
baseurl=http://mirror.centos.org/centos/4/os/i386/
gpgcheck=1

[updates]
name=Red Hat Linux $releasever - Updates
baseurl=http://mirror.centos.org/centos/4/os/i386/
gpgcheck=1
link|improve this question
feedback

migrated from stackoverflow.com Nov 4 '11 at 7:59

This question came from our site for professional and enthusiast programmers.

2 Answers

Why are you pulling in packages from both the centos and redhat repositories ?

link|improve this answer
I just found this yum.conf on the web - is not this correct? Can you give me correct version? – Alexey Nov 5 '11 at 17:26
feedback

How did you get the machine installed? It looks to be far from any RHEL.

Seeing your repo file and the output suggest the machine may be greatly misconfigured.

Server: CentOS-9 - Base Server: Red Hat Linux 9 - Updates

The $releasever is 9 and as far as I know there is no RHEL9 so I assume it is RHL9 (Red Hat Linux - the missing E is the key) which is now over 10 years old and unsupported since about 2000.

So you are trying to update RHL9 with repos for RHEL4 which is just wrong.

Go get a newer distro or try to find repos for RHL9.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.