同じライブラリの異なるバージョンが原因でパッケージマネージャがクラッシュする。

同じライブラリの異なるバージョンが原因でパッケージマネージャがクラッシュする。
OS: Debian stretch
linux kernel: 4.7.0-1-amd64

私のNVIDIAパッケージのいくつかの間に満たされていない依存関係があります。彼らはapt/dpkg/aptitudeによってlibnvidia-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-*regexの下のすべてのアイテムapt-getも削除する必要がありました。libnvidia-*削除する内容を読んだ後は何でも壊れそうです。

その後、再起動し、一時パッケージまたは残りのパッケージとファイルの両方を消去し、私が持っているjessie-backports debを使用してnvidiaドライバをインストールしたことを確認し/etc/apt/sourceslist(依存関係を手動で修正して処理を避ける)、すべてがうまく機能します。ありがとう Dr. Green Thumb、あなたは愚かです。

おすすめ記事