Install gcc 4.3.3  after installing gcc 4.4.1

guyneo used Ask the Experts™
Hi experts,
I have Ubuntu 9.10. I installed gcc using the command.
sudo apt -get install gcc-4.4.1
Works fine. Except the software I am trying to run needs 4.3.3
How do I uninstall this 4.4 and install 4.3
I tried removing using the command
sudo apt -get remove gcc and installed 4.3 by
using sudo apt -get install gcc-4.3
When I type gcc or gcc -v I get Command not found.
As you can tell from the question. I am a newbie to Linux. So please give me step by step instructions.

Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
The symbolic links in /usr/bin may still point to the wrong (uninstalled) version.

Try this:
# sudo ln -s /usr/bin/gcc-4.3.3 /usr/bin/gcc
# sudo ln -s /usr/bin/g++-4.3.3 /usr/bin/g++

You may want to check your /usr/bin folder first to check whether it's 4.3.3 that shows up there, or 4.3
Then correct the above commands accordingly.
You can use the update-alternatives command to select the correct compiler. Several compiler can be installed side-by-side, and selected accordingly to your necessities. Also the -V command line switch can help.


#sudo update-alternatives --config gcc

to configure gcc and g++ at the same time.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial