I have access to a cluster with CentOS 7, which has gcc installed. Unfortunately, gcc version is pretty old (4.8), and is reported incompatible by some of the Python packages I am using, requiring version >5.0. However, since I do not have root privilege, I cannot easily install/delete anything there.
I have followed some answers from stack exchange, installing the gcc 8.4 from source code. The
make install seem to be successful.
Then, I have followed the accepted answer to one question here (How to set the default gcc version for only one user?) to change the default. However, it does not work for me.
- The gcc 8.4 is located at
$HOME/gcc_8_4with a (seemingly properly working) symlink
- The gcc 4.8 is located at
PATH, as written in the mentioned answer.
- If I call
$HOME/bin/gcc/bindirectory, I get the version 8.4. If I call it as
gcc --versionfrom any location, I still get 4.8.
So, has something changed since that answer was posted? Why the 4.8 version is taken as a default one despite it coming after 8.4 version in the
PATH? Is there any way to fix that?