在将我的 Nvidia GT 740M 笔记本电脑上的安装从 14.04 升级到 16.04 后,我想将 GPU 驱动程序从软件和更新 > 附加驱动程序。系统识别了我的显卡,没有问题,但是当我选择专有驱动程序并在几秒钟后应用更改时,更改栏停止,并且 nouveau 再次默认选择。
我运行了这个命令:
sudo apt-get install nvidia-370
但输出说you have held broken packages
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:
nvidia-370 : Depends: lib32gcc1 but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
我也尝试过:
sudo apt-get install lib32gcc1
但它说:
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:
lib32gcc1 : Depends: gcc-6-base (= 6.0.1-0ubuntu1)
but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
我尝试使用主服务器,但这并不能解决我的问题。我还尝试使用以下命令修复损坏的软件包:
sudo dpkg --configure -a
sudo apt-get purge
sudo apt-get clean
运行结果:apt policy lib32stdc++6 gcc-6-base lib32gcc1
lib32stdc++6:
Instalados: (ninguno)
Candidato: 5.4.0-6ubuntu1~16.04.2
Tabla de versión:
5.4.0-6ubuntu1~16.04.2 500
500 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages
500 http://archive.ubuntu.com/ubuntu xenial-security/main amd64 Packages
5.3.1-14ubuntu2 500
500 http://archive.ubuntu.com/ubuntu xenial/main amd64 Packages
gcc-6-base:
Instalados: 6.2.0-3ubuntu11~14.04
Candidato: 6.2.0-3ubuntu11~14.04
Tabla de versión:
*** 6.2.0-3ubuntu11~14.04 100
100 /var/lib/dpkg/status
6.0.1-0ubuntu1 500
500 http://archive.ubuntu.com/ubuntu xenial/main amd64 Packages
lib32gcc1:
Instalados: (ninguno)
Candidato: 1:6.0.1-0ubuntu1
Tabla de versión:
1:6.0.1-0ubuntu1 500
500 http://archive.ubuntu.com/ubuntu xenial/main amd64 Packages
看来 gcc-6-base 仍然指的是 14.04。
答案1
sudo apt-get autoclean
这是最后的解决方案:删除 sources.list 文件并创建新的 sources.list...
sudo rm /etc/apt/sources.list
然后输入
sudo software-properties-gtk
这将打开 software-properties-gtk 并自动创建一个 newsources.list。
然后将服务器更改为美国或您选择的任何其他服务器。您必须从新对话框中启用存储库才能创建新的 sources.list。
勾选所有框然后单击“恢复”,再单击“关闭”。
需要恢复默认存储库
sudo apt-get update && sudo apt-get dist-upgrade -y
(最好在安装之前备份此文件,以便在发生此类情况时进行恢复)