我需要 gcc 5.3.1 或更早版本的原因是因为 CUDA 8 尚不支持任何更新版本。它与这个问题但不一样。
最初我尝试过:
sudo apt-get install gcc-5
但是安装了 gcc-5.4
然后我又补充道“http://archive.ubuntu.com/ubuntuxenial main” 作为软件更新下的 repo。
然后我尝试了一下。
sudo apt-get install gcc-5=5.3.1-14ubuntu2
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
gcc-5 : Depends: cpp-5 (= 5.3.1-14ubuntu2) but 5.4.1-8ubuntu1 is to be installed
Depends: gcc-5-base (= 5.3.1-14ubuntu2) but 5.4.1-8ubuntu1 is to be installed
Depends: libgcc-5-dev (= 5.3.1-14ubuntu2) but 5.4.1-8ubuntu1 is to be installed
E: Unable to correct problems, you have held broken packages.
我该如何解决这个问题才能安装 gcc 5.3.1