I use CentOs 5 machine which has gcc 4.1.2
. I want to try out few C++14 features and would like to install gcc 5
in a non default location. What is the best way to approach this?
For example, for gcc 4.7 or 4.8, the question and answer at How to Install gcc 4.7.x/4.8.x on CentOS is helpful. In that approach, it seems that the latest Redhat developer toolset, v 3.1 beta, has gcc 4.9.2.
[P.S.: Changing the CentOs version is not an option for me.]
Best Answer
I don't think it's possible to install GCC-5 on CentOS 5, its
glibc
version (2.5) is way too old.For CentOS 6, use the following instructions:
Or you can use Docker with the following Dockerfile: