1

Hi guys I've seen similar questions but not even one fully answered, so here's mine:

I need to install an older version (6.3) of GCC than the one in my computer, i'm using Ubuntu 17.10 an my actual GCC verion is "gcc version 7.2.0 (Ubuntu 7.2.0-8ubuntu3.2)".

I've heard that is possible to install more than one GCC version in the same computer, would you suggest it? If so how would i be able to choose when to use which?

Thanks for your attention! :)

zurg
  • 79
  • 1
  • 7

1 Answers1

2

In standard Ubuntu repo you have various gcc versions. Simply type apt-get install gcc-6 to install gcc version 6.4.

Jacek Herbrych
  • 241
  • 1
  • 7
  • 1
    cool but i need 6.3 – zurg Mar 22 '18 at 19:47
  • gcc-6 v6.3.0 and gcc-6 v6.4.0 : No functional difference. From `gcc-6.4.0/NEWS` : This release is a bug-fix release, containing fixes for regressions in GCC 6.3 relative to previous releases of GCC. – Knud Larsen Mar 22 '18 at 20:22
  • @KnudLarsen OP can give it a try, but MATLAB has particular requirements for the compiler. Problem isn't in trying, problem is that software depends on other specific software versions :) – Sergiy Kolodyazhnyy Mar 22 '18 at 20:25
  • 1
    If 6.4 will not work (which should be checked since this is probably the safest solution) there are two other options: (1) https://launchpad.net/~jonathonf/+archive/ubuntu/gcc-6.3 i.e., the backport of gcc 6.3 or (2) Build it from Sources https://askubuntu.com/questions/864893/update-gcc-to-the-6-3-version – Jacek Herbrych Mar 23 '18 at 16:41
  • Ok, this seems like the exact problem I also have, I need to compile the MATLAB interface of MUMPS, which is a sparse linear solver. 2018a version of MATLAB requires gcc 6.3. I added the above ppa but whatever I do, it is not possible to install the specific gcc-6.3 version, any ideas on how to continue further? BTW, I did not have the time to, yet, try to install from the source. – Umut Tabak Apr 27 '18 at 17:24
  • I recommend installing with aptitude instead of apt-get as this can help resolve the dependency issues. – JStrahl Oct 09 '18 at 07:59