Gcc-C++ Issue on CentOS 5.5

Issues related to software problems.
Posts: 1
Joined: 2012/04/26 13:52:59

Gcc-C++ Issue on CentOS 5.5

Postby alight42 » 2012/04/26 13:59:37

Hi. Today I jsut bought my new OpenVZ VPS. After some hard hours of figuring out on how to open my 80 port to run apache I danged into another issue. I never ask help and I try to find it out by myself but I'm just DONE with this.

My problem is this:

I am trying to compile something that apparently requires a gcc-c++ version higher than 4.3.
I first installed the 'default' gcc compiler: "yum install gcc-c++" .

I realised it's not good since I got some strange errors on my "make output" so I started to isntall the 4.4 version:
"yum install gcc44-c++" .

All fine, except it wouldn't use this new version.
On: "gcc -v" it's still "gcc version 4.1.2 20080704 (Red Hat 4.1.2-52)"

Well I tought I should remove it so there I did:

"yum remove gcc-c++" and OFC it didn't worked, but this time another error popped up.

"/bin/sh: /usr/bin/c++: No such file or directory"

Well now I come to ask for you mercy and help me through this: My gcc44-c++ version should be installed right? If so, where is it? It most certainly not on "/usr/bin" where I need it right? If it's anywhere else how can I link to it?

Or how can I install any higher version or equal to 4.3 of gcc-c++ on this dirrectorry?
"/usr/bin" ?

Thanks in advance for your help and excuse me for my poor english.

User avatar
Forum Moderator
Posts: 20597
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Gcc-C++ Issue on CentOS 5.5

Postby TrevorH » 2012/04/26 20:29:40

Code: Select all

export CC=/usr/bin/gcc44
export CXX=/usr/bin/g++44

Don't forget to rerun ./configure after exporting those and from the same terminal window.

Retired Moderator
Posts: 18276
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America

Gcc-C++ Issue on CentOS 5.5

Postby pschaff » 2012/04/26 21:41:20

Welcome to the CentOS fora. Please see the recommended reading for new users linked in my signature.

That seems to be a pretty poor provider you are using. You should immediately update to the current release 5.8. 5.5 is seriously obsolete and has numerous known bugs and security issues that have been fixed in subsequent updates. Obsolete releases are not supported, nor is it advisable to be running them. See the CentOS 5.6 Release Notes Section 4 for details on the recommended update procedure, and CentOS 5.8 Release Notes for other information.

Edit: Just noted that you mentioned OpenVZ which means you are not really running CentOS at all. See:
Other Voices
When CentOS Is Not CentOS