I need to upgrade GCC. When I type yum install GCC it tells me Package gcc-4.1.2-51.el5.x86_64 already installed and latest version. Unfortunately I'm trying to install some software which requires GCC 4.3 minimum.

I checked out the possibility of installing GCC from source, but it looks very complicated!

How can I upgrade GCC to at least version 4.3 on CentOS?

  • If you want to update the system gcc you should first establish that this will break nothing that relies on it. – Paul Dec 1 '11 at 5:56
  • Like what, for example? – Alasdair Dec 1 '11 at 5:57
  • GCC is just a compiler right? So why would applications use it. I thought it was just for compiling sources? – Alasdair Dec 1 '11 at 5:59
  • I am not entirely sure with Centos, but Centos expects system files to be the version that is issued - I would just add the "will it break stuff" query to your question so it gets addressed as well as the howto – Paul Dec 1 '11 at 6:01
  • Yes it is just a compiler, some distributions will recompile some updates. – Paul Dec 1 '11 at 6:08

CentOS 5.x has the "gcc44" package containing GCC version 4.4.

  • 1
    +1 - This is the workaround I have been using on my boxes, however it will require manual intervention in the future when 4.4 is moved into the main CentOS GCC rpm. – Turix Feb 10 '12 at 11:16

You could try Remi's repository. It usually has more up to date packages than the normal CentOS repository.

  • While Remi's repo has some good updates, it tends to focus on the PHP/MySQL ecosystem. It happens that there are no GCC updates there for CentOS 5 or 6. – Charles Nov 8 '12 at 6:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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