Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have version 4.4.4 of gcc installed and would like to update to either a specific version or to the latest version. Here is what I have tried:

sudo yum install gcc-c++

this tells me that Package gcc-c++-4.4.4-10.fc12.i686 already installed and latest version (not true, there is at least a version 4.8 available).

Next I tried a specific version:

sudo yum install gcc-c++-4.8.1

with the result of No Package gcc-c++-4.8.1 available..

At last I tried to update the package with

sudo yum update gcc-c++

with the result No Packages marked for Update.

So how the heck do I update the version of gcc and/or gcc-c++ to be able to compile projects with C++11?

share|improve this question
2  
The gcc on the fedora 17 box I'm on now is 4.7.2, so fedora 18 is at least that. If you're really using F12 and you don't have a reason beyond laziness or "I'm scared of systemd", you should upgrade (or re-install if you can't upgrade that far). Since F12 reached end-of-life a few years ago, nothing in it will be updated any further. –  TAFKA 'goldilocks' Apr 10 '13 at 19:11
add comment

1 Answer

The message already installed and latest version is referring to the latest version of the RPM (binary package) for the version of Fedora. It appears that you are using Fedora 12, which is quite outdated. Your best course of action is likely to upgrade to the latest version of Fedora first, then you will have a more recent version of GCC available (4.7.2).

It takes a while for major software like GCC to make it through a distribution's build and QA process. So if you absolutely must have GCC 4.8.1 now (which seems unlikely given the age of your distribution), then you'll probably either have to find a third-party package or build it from source yourself. Regardless, I'd still recommend upgrading Fedora to reduce dependency complications.

share|improve this answer
    
I was hoping for a non-upgrade answer. Well, I will consider this option. –  Alex Apr 10 '13 at 18:50
    
I've edited my answer to provide some additional options. But they are likely to be more complicated than a distribution upgrade. –  depquid Apr 10 '13 at 18:52
    
Also, keep in mind that if you keep your distribution up to date, then you will automatically get updates of packages (e.g. GCC 4.8) once they become available for the distribution. –  depquid Apr 10 '13 at 19:48
    
It IS possible to upgrade to the new versions without doing the OS upgrade, but you'd have to probably commpile and package it from the source. Even then, there might be come shared library incompatibles that come into play. –  mdpc Apr 11 '13 at 5:36
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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