0

I followed these steps for installing a gcc 8.4 version on a custom folder (--prefix = /FOLDER/)

https://www.hongliangjie.com/2012/07/20/how-to-install-gcc-higher-version-in-alternative-directory/

But I'm not able to use the new gcc 8.4. Everywhere I do 'gcc -v' I get gcc version 4.8. I've tried also in /FOLDER/, /FOLDER/bin but no way. Neither 'gcc-8'

I'm working on my pivate space on a cluter via 'ssh', so no root permission.

I saw previous question but using

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/FOLDER/libexec/gcc/powerpc64le-unknown-linux-gnu/8.4.0

not working.

Any help?

jeb
83.3k20 gold badges181 silver badges237 bronze badges
asked Jan 27, 2021 at 14:29

1 Answer 1

0

Either you call this gcc with an absolute path,

/FOLDER/bin/gcc --version

or you add its location to your PATH:

export PATH=/FOLDER/bin:$PATH
gcc --version

Unix does not add the current directory to PATH as Windows does, so to run the new gcc from /FOLDER/bin you'd have to specify to search from the current location:

cd /FOLDER/bin
./gcc --version
answered Jan 27, 2021 at 14:38
Sign up to request clarification or add additional context in comments.

1 Comment

Many thanks! It was so easy but also kind of weird :D

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.