Alexander G.
Alexander G.

Reputation: 485

How to install gcc-3.4 and g++-3.4 on latest ubuntu?

I have Ubuntu 20.10 LTS and want to use g++-3.4 to build things. Old things.

After googling like mad about 2 hrs and trying to add different package repositories for apt-get I finally came to conclusion that auto-update just does not work. If anyone is struggling with the same problem or have a solution - be my guest.

Upvotes: 2

Views: 2090

Answers (1)

Alexander G.
Alexander G.

Reputation: 485

The only solution that worked for me is:

Manual installing of .deb packages

(sad programmer noises)

  1. Go to http://old-releases.ubuntu.com/ubuntu/pool/universe/g/
  2. Download all .deb packages for gcc compiler version you want, f.e.:
gpc-2.1-3.4_3.4.6-6ubuntu5_amd64.deb
cpp-3.4_3.4.6-6ubuntu5_amd64.deb       lib32g2c0_3.4.6-6ubuntu5_amd64.deb
g++-3.4_3.4.6-6ubuntu5_amd64.deb       libg2c0_3.4.6-6ubuntu5_amd64.deb
g77-3.4_3.4.6-6ubuntu5_amd64.deb       libg2c0-dev_3.4.6-6ubuntu5_amd64.deb
gcc-3.4_3.4.6-6ubuntu5_amd64.deb       libstdc++6-dbg_3.4.6-6ubuntu5_amd64.deb
gcc-3.4-base_3.4.6-6ubuntu5_amd64.deb  libstdc++6-dev_3.4.6-6ubuntu5_amd64.deb
  1. Manually install them by running command, f.e.:
sudo dpkg -i ./gcc-3.4-base_3.4.6-6ubuntu5_amd64.deb 
sudo dpkg -i ./cpp-3.4_3.4.6-6ubuntu5_amd64.deb
sudo dpkg -i ./gcc-3.4_3.4.6-6ubuntu5_amd64.deb

and so on...

Check the console output errors about package dependencies to figure out the package install order.

  • If you encounter error (bug probably) about crossdependency of "g++..." package to "libstdc++..." package and v.v. then run install command to update libstdc++ package with exact version number, f.e.:
sudo apt-get install libstdc++6
  1. Hooray! Use installed gcc (g++) version by, f.e.:
g++-3.4 -v

Upvotes: 4

Related Questions