Can I install two different versions of GCC at the same time?

I am using Ubuntu 9.10
For a specific piece of code, I need GCC 3.2, but I have a higher version. Is it possible to install multiple versions and use what I want?

+4
source share
3 answers

Have you been looking for the Ubuntu package archive for gcc ?

If gcc 3.3 is fine, you can download gcc-3.3 and its related .deb packages for dapper, and I suspect it will install and happily coexist with gcc 4.4, which you get with karmic. (You will definitely need to use it as gcc-3.3.)

Otherwise, you have to:

  • download the appropriate gcc source kit
  • create it yourself with installdir so there is no place like / opt / gcc -3.3
  • make sure your PATH is configured correctly when you need it.
+1
source

Yes, you can have several installations. You can invoke a specific version with gcc-3.2 . you can search the repository using apt-cache search gcc-3 to find the installation package using apt-get install . a quick search only shows gcc-3.3 in the repository, if this version does not work for you, you need to dig more or install it manually. Another poster gave more details.

Consider accepting previous answers to the questions you answered, otherwise you will not receive answers.

+1
source

It is possible to have more than one, but they need to be named differently and installed in different folders. See GCC Cross-Compilation Guides, but don’t build for different architectures. However, note that compiling GCC alone is quite complicated, so fixing the application you need to compile might be easier.

0
source

Source: https://habr.com/ru/post/1302782/


All Articles