5

I currently have Ubuntu 19.10 with gcc 9.1.2

I want to install previous versions of gcc for CUDA 8 (gcc 5 in this case). But I am getting this error:

(base) ➜ ~ sudo apt-get install gcc-5 g++-5                                 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package g++-5 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
  gcc-7-test-results gcc-8-test-results:i386 gcc-7-test-results:i386
  gcc-8-test-results gcc-9-test-results:i386 gcc-9-test-results

Package gcc-5 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'gcc-5' has no installation candidate
E: Package 'g++-5' has no installation candidate

Can we install it in Ubuntu 20.04?

  • This explains it, somewhat, I don't know if it's exactly what you need, an there's also no information as to whether this is safe (I'm in the same conundrum of needing to downgrade my gcc) https://linuxconfig.org/how-to-switch-between-multiple-gcc-and-g-compiler-versions-on-ubuntu-20-04-lts-focal-fossa – Jesus Montoya Oct 18 '22 at 01:01

0 Answers0