无法安装旧版本的 gcc

无法安装旧版本的 gcc

我需要 gcc-6 和 g++-6 来编译一个特定的程序(与 CUDA 相关),我尝试遵循这些说明但由于某些原因,我得到以下信息:

> sudo apt-get install gcc-6 g++-6 -y
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package gcc-6 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

Package g++-6 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-6' has no installation candidate
E: Package 'g++-6' has no installation candidate

有没有简单的方法来安装这些版本的 gcc 和 g++?

提前致谢。

相关内容