3

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++.

miguels
  • 606
  • 1
  • 7
  • 30
  • 1
    Why do you need GCC 4.4.7? Uou could install several versions of GCC and use explicitly `g++-4.7` or `gcc-4.4` §.... – Basile Starynkevitch Oct 06 '14 at 11:40
  • Take a look at this stackoverflow [installing older version of gcc](http://stackoverflow.com/questions/7854752/installing-older-version-of-gcc) and [installing older version of gcc using apt-get](http://superuser.com/questions/596197/installing-older-version-of-gcc-using-apt-get) on superuser. this questions really belongs to superuser or perhaps to ask ubuntu. – Richard Chambers Oct 06 '14 at 11:44
  • @BasileStarynkevitch: I went for your solution. Yet i thought it was possible doing versions-install via apt-get. – miguels Oct 06 '14 at 13:27

2 Answers2

1

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)

miguels
  • 606
  • 1
  • 7
  • 30
  • this don't work for me: `g++-4.6.3: command not found`. can you help on the command syntax? – Shamim Dec 31 '16 at 14:31
  • That's the syntax, maybe you don't have the 4.4 version installed. First try the command g++-4.4 and check if it's installed. – miguels Jan 02 '17 at 09:22
0

To install a specific version use sudo apt-get install package=version. Or use synaptic package manager which allows you to install specific versions.

Ashwani
  • 1,938
  • 11
  • 15