我正在尝试nvidia-driver
从 Debian 实验版安装:
$ sudo apt-get install nvidia-driver=352.63-1
但我收到依赖性错误:
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-driver : Depends: libgl1-nvidia-glx (= 352.63-1) but 340.96-2 is to be installed
Depends: libegl1-nvidia (= 352.63-1) but 340.96-2 is to be installed
Depends: nvidia-driver-bin (= 352.63-1) but 340.96-2 is to be installed
Depends: xserver-xorg-video-nvidia (= 352.63-1) but 340.96-2 is to be installed
Depends: nvidia-vdpau-driver (= 352.63-1) but 340.96-2 is to be installed
Depends: nvidia-alternative (= 352.63-1)
Depends: nvidia-kernel-dkms (= 352.63-1) or
nvidia-kernel-352.63
Recommends: nvidia-settings (>= 352) but 340.93-1 is to be installed
Recommends: libgles1-nvidia (= 352.63-1) but 340.96-2 is to be installed
Recommends: libgles2-nvidia (= 352.63-1) but 340.96-2 is to be installed
E: Unable to correct problems, you have held broken packages.
因此显然nvidia-driver
从实验来看,apt 具有依赖项,它会尝试从我的默认源安装,而不是从我尝试安装的包所在的同一源安装。
有没有办法让 apt-get 自动安装所有必要的依赖项?如果它提示我首先要进行哪些更改,那么我知道我没有弄乱一个非常重要的包,那就太好了。
答案1
当我在 sources.list 中有重复的行时,我看到了这种情况:
deb http://httpredir.debian.org/debian/ jessie contrib main deb http://httpredir.debian.org/debian/ 非免费
一切都很好,因为我用一行替换了这两行
deb http://httpredir.debian.org/debian/ jessie contrib main 非自由