同一庫的不同版本破壞了我的套件管理器

同一庫的不同版本破壞了我的套件管理器
OS: Debian stretch
linux kernel: 4.7.0-1-amd64

我的一些 nvidia 軟體包之間存在未滿足的依賴關係。它們似乎是由apt/dpkg/aptitudelibnvidia-glcore強制libnvidia-eglcore它們似乎不起作用。apt-get install -f給我這個輸出:

root@debdesk:~# apt-get upgrade -f
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
Calculating upgrade... Done
The following packages have been kept back:
  libslang2 libslang2-dev linux-headers-4.7.0-1-amd64
  linux-headers-4.7.0-1-common linux-image-4.7.0-1-amd64
The following packages will be upgraded:
  libnvidia-eglcore libnvidia-glcore
2 upgraded, 0 newly installed, 0 to remove and 5 not upgraded.
13 not fully installed or removed.
Need to get 0 B/12.5 MB of archives.
After this operation, 28.0 MB disk space will be freed.
Do you want to continue? [Y/n] y
Reading changelogs... Done
(Reading database ... 251496 files and directories currently installed.)
Preparing to unpack .../0-libnvidia-glcore_367.44-2_amd64.deb ...
Unpacking libnvidia-glcore:amd64 (367.44-2) over (352.79-10~bpo8+2) ...
dpkg: error processing archive /tmp/apt-dpkg-install-sOf2cJ/0-libnvidia-glcore_367.44-2_amd64.deb (--unpack):
 trying to overwrite shared '/usr/share/bug/libnvidia-glcore/script', which is different from other instances of package libnvidia-glcore:amd64
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Preparing to unpack .../1-libnvidia-eglcore_367.44-2_amd64.deb ...
Unpacking libnvidia-eglcore:amd64 (367.44-2) over (352.79-10~bpo8+2) ...
dpkg: error processing archive /tmp/apt-dpkg-install-sOf2cJ/1-libnvidia-eglcore_367.44-2_amd64.deb (--unpack):
 trying to overwrite shared '/usr/share/doc/libnvidia-eglcore/changelog.Debian.gz', which is different from other instances of package libnvidia-eglcore:amd64
Errors were encountered while processing:
 /tmp/apt-dpkg-install-sOf2cJ/0-libnvidia-glcore_367.44-2_amd64.deb
 /tmp/apt-dpkg-install-sOf2cJ/1-libnvidia-eglcore_367.44-2_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1) 

apt-cache policy libnvidia-glcore libnvidia-glcore:i386列印以下內容:

libnvidia-glcore:
  Installed: 352.79-10~bpo8+2
  Candidate: 367.44-2
  Version table:
     367.44-2 500
        500 http://ftp.de.debian.org/debian stretch/non-free amd64 Packages
        500 http://httpredir.debian.org/debian stretch/non-free amd64 Packages
 *** 352.79-10~bpo8+2 100
        100 http://httpredir.debian.org/debian jessie-backports/non-free amd64 Packages
        100 /var/lib/dpkg/status
libnvidia-glcore:i386:
  Installed: 367.44-2
  Candidate: 367.44-2
  Version table:
 *** 367.44-2 500
        500 http://ftp.de.debian.org/debian stretch/non-free i386 Packages
        500 http://httpredir.debian.org/debian stretch/non-free i386 Packages
        100 /var/lib/dpkg/status
     352.79-10~bpo8+2 100
        100 http://httpredir.debian.org/debian jessie-backports/non-free i386 Packages

前段時間,我嘗試從實驗分支安裝一些軟體包,並將原始程式碼保存在原始檔中。我一直在使用從 jessie-backports 取得的 nvidia-driver 版本。看起來/etc/apt/sources.list像這樣:

# deb cdrom:[Debian GNU/Linux stretch-DI-alpha7 _Stretch_ - Official Snapshot amd64 NETINST Binary-1 20160630-14:29]/ stretch main

#deb cdrom:[Debian GNU/Linux stretch-DI-alpha7 _Stretch_ - Official Snapshot amd64 NETINST Binary-1 20160630-14:29]/ stretch main

deb http://ftp.es.debian.org/debian/ stretch main
deb-src http://ftp.es.debian.org/debian/ stretch main

deb http://ftp.de.debian.org/debian experimental main

deb http://security.debian.org/debian-security stretch/updates main
deb-src http://security.debian.org/debian-security stretch/updates main

deb http://ftp.de.debian.org/debian stretch main non-free
deb http://httpredir.debian.org/debian/ stretch main contrib non-free

deb http://httpredir.debian.org/debian jessie-backports main contrib non-free

由於這些依賴項,我無法清除或重新安裝安裝。

我能做些什麼?

編輯:

的輸出apt-get purge libnvidia-eglcore libnvidia-glcore

Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
 libegl-nvidia0 : Depends: libnvidia-eglcore (= 367.44-2) but it is not going to be installed
 libgl1-nvidia-glx : Depends: libnvidia-glcore (= 367.44-2) but it is not going to be installed
 libgles-nvidia1 : Depends: libnvidia-eglcore (= 367.44-2) but it is not going to be installed
 libgles-nvidia2 : Depends: libnvidia-eglcore (= 367.44-2) but it is not going to be installed
 libglx-nvidia0 : Depends: libnvidia-glcore (= 367.44-2) but it is not going to be installed
 nvidia-driver-libs : Depends: libnvidia-glcore (= 367.44-2) but it is not going to be installed
                      Recommends: nvidia-driver-libs-i386
 xserver-xorg-video-nvidia : Depends: libnvidia-glcore (= 367.44-2) but it is not going to be installed
                             Recommends: nvidia-settings (>= 367) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

答案1

所以我想我終於清除了整個 nvidia 的東西並設法安裝了一組全新的軟體包。

我必須手動清除給我帶來錯誤依賴項的軟體包,然後我遇到了一些殘留庫和配置的問題,這些庫和配置在清除後仍然安裝nvidia-*apt-get所以我還確保刪除了libnvidia-*正則表達式下的所有內容,這並沒有看起來在閱讀完要卸載的內容後它會破壞任何東西。

之後,我重新啟動並確保清除了所有臨時或殘留的軟體包和文件,使用我擁有的 jessie-backports deb 安裝了 nvidia 驅動程式/etc/apt/sourceslist(自己手動修復依賴項並避免處理它們),現在一切都正常了。謝謝綠拇指博士,你就是個混蛋

相關內容