How can I install the old version of gcc (gcc-4.1.2) on Ubuntu? ( without Synaptic ) .My actual version of gcc is gcc-4.4.7
2 Answers
Assume a 64bits Ubuntu 16.04 .
Available is {gcc-3.4.6, g++-3.4.6} ... This version is very close to gcc-4.1.2 .
gcc34 https://drive.google.com/file/d/0B7S255p3kFXNRTkzQnRSNXZ6UVU/view?usp=sharing
g++34 https://drive.google.com/file/d/0B7S255p3kFXNV3J3bnVoWGNWdG8/view?usp=sharing
Clik the packages, compat-gcc34-3.4.6-ubuntu1204-1_amd64.deb and compat-gcc-34-c++_3.4.6-20_amd64.deb : They will then be installed.
Using, examples : 1) $ export CC=gcc34 CXX=g++34 && [other command] ... like 2) $ export CC=gcc34 CXX=g++34 && ./configure .... and 3) $ gcc34 file.c
? Which application is it that requires gcc-4.1.2 ?
- 3,134
Possible dupe of this question: How to install specific Ubuntu packages, with exact version?
First, find the exact name of the version of gcc you wish to install by running:
sudo apt-cache madison ^gcc
Then find the version you want and run:
sudo apt-get install gcc=VERSION
Finally, run this command to check which version of gcc you installed:
dpkg -l 'gcc*' | grep ^i
Note: This may cause some dependency issues.
- 138