Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install previous version (4.4.7) of gcc/g++ via apt-get in ubuntu 14.04?

Tags:

c++

gcc

g++

g++-4.7

Due to legacy issues I have to install the gcc/g++ version 4.4.7 in my current Ubuntu-gnome 14.04 32 bit virtual machine.

The default update via apt-get install is the 4.8.2 which is a "no go" work for this project. I've removed it (apt-get remove) . The downloaded and tried to install the 4.4.7 source but it requires to many dependencies.

Via apt-get install I've tried doing:

sudo apt-get install gcc-4.4

The download/install is quite fast and when checkign gcc version it give indication that no gcc is installed to run the

sudo apt-get install gcc

If I do this I'll get the 4.8version.

All above also applies to g++.

like image 210
miguels Avatar asked Jan 22 '26 14:01

miguels


1 Answers

I compiled the code with the following flag which solved the problem:

g++-4.4.7

It compiles for a specific version. (in this case 4.4.7)

like image 144
miguels Avatar answered Jan 25 '26 15:01

miguels