我们可以在Ubuntu 20.04上安装旧版本的gcc和g ++吗

我目前有带有gcc 9.1.2的Ubuntu 19.10

我想为CUDA 8安装gcc的早期版本(在这种情况下为gcc 5)。但我收到此错误:

(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

我们可以在Ubuntu 20.04中安装它吗?

评论