Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
The compiler used at school is GCC 3.1 I've got 2.96 here on my Red Hat machine. So I downloaded a *.tar.bz2 file of GCC 3.1 and decompressed it. I then configured it, ran 'make bootstrap' (took an hour and a half), then ran 'make install'. Everything went just fine and I received no error messages.
Well, afterwards, at he prompt, I typed $gcc -dumpversion and was still told I was using 2.96. How do I go about making 3.1 the default compiler? Ideally, I'd like to remove all references to 2.96 if I can.
ok, look up where gcc-3.1 was installed, most probably /usr/local/bin, the original is in /usr/bin, you have 2 options: make your path aware of /usr/local/bin before /usr/bin; second, verify that you have right gcc -
/usr/bin/gcc -dumpversion
/usr/local/gcc -dumpversion
and move the one that returns older version to something benign or remove it completely (mv /usr/bin/gcc /usr/bin/gcc296 or rm -f /usr/bin/gcc, as I said it's most probably in /usr/bin, then you can create a symink in /usr/bin pointed to the right gcc
also, gcc might very well be CALLD gcc-3.1 or gcc3 or similar. the two versions can very happily live side by side, so they should both be accessible. "gcc" is probably just a symlink to /usr/bin/gcc-2.96 or something...
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.