Debian Buster에서 NVIDIA를 제거한 후 종속성이 깨졌습니다.

Debian Buster에서 NVIDIA를 제거한 후 종속성이 깨졌습니다.

저는 데비안 버스터를 사용합니다. NVIDIA를 설치하고 Nouveau로 돌아가기로 결정한 후 NVIDIA를 제거한 후 패키지를 업데이트하고 설치하는 데 몇 가지 문제가 발생했습니다.

업데이트하려고 하면 다음과 같은 결과가 나타납니다.

$ sudo apt-get upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

뭔가를 설치할 때:

$ sudo apt-get install mtpaint
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 glx-alternative-nvidia : Depends: glx-diversions (= 0.8.3)
 mtpaint : Depends: gtklp but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

"apt --fix-broken install"을 실행해도 문제가 해결되지 않습니다.

$ sudo apt --fix-broken install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
  libegl-mesa0:i386 libegl1:i386 libgbm1:i386 libgles2:i386 libnvidia-eglcore:i386 libwayland-client0:i386 libwayland-server0:i386
  linux-image-4.12.0-2-amd64 linux-image-4.13.0-1-amd64
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
3 not fully installed or removed.
Need to get 0 B/11.2 kB of archives.
After this operation, 0 B of additional disk space will be used.
dpkg: dependency problems prevent configuration of glx-alternative-nvidia:
 glx-alternative-nvidia depends on glx-diversions (= 0.8.3); however:
  Package glx-diversions is not installed.

dpkg: error processing package glx-alternative-nvidia (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of nvidia-alternative:
 nvidia-alternative depends on glx-alternative-nvidia (>= 0.8.3~); however:
  Package glx-alternative-nvidia is not configured yet.

dpkg: error processing package nvidia-alternative (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 glx-alternative-nvidia
 nvidia-alternative
E: Sub-process /usr/bin/dpkg returned an error code (1)

내 시스템에 대한 일부 정보:

$ uname -a
Linux hung 4.16.0-1-amd64 #1 SMP Debian 4.16.5-1 (2018-04-29) x86_64 GNU/Linux

$ cat /etc/apt/sources.list
deb http://httpredir.debian.org/debian testing main contrib non-free
deb http://httpredir.debian.org/debian testing-updates main contrib non-free
deb http://security.debian.org/ testing/updates main contrib non-free


$ ls /etc/apt/sources.list.d/
brave-buster.list                          google-chrome.list       skype-stable.list       sublime-text.list
brave-buster.list.save                     google-chrome.list.save  skype-stable.list.save  sublime-text.list.save
ethereum-ubuntu-ethereum-bionic.list       heroku.list              slack.list              yarn.list
ethereum-ubuntu-ethereum-bionic.list.save  heroku.list.save         slack.list.save         yarn.list.save

이에 대한 해결책이 있으면 알려주시기 바랍니다. 감사해요!

편집 1:손상된 패키지를 삭제할 수 없습니다.

$ sudo apt purge nvidia-alternative glx-alternative-nvidia
[sudo] password for hungtran:        
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 libgles-nvidia2 : Depends: nvidia-alternative (= 390.48-3)
 libglx-nvidia0 : Depends: nvidia-alternative (= 390.48-3)
 libnvidia-cfg1 : Depends: nvidia-alternative (= 390.48-3)
 libnvidia-egl-wayland1 : Depends: nvidia-alternative (= 390.48-3)
 libnvidia-ml1 : Depends: nvidia-alternative (= 390.48-3)
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

답변1

glx-diversions를 다시 설치한 후 다른 패키지를 제거할 수 있었습니다.

$ sudo apt-get install glx-diversions --reinstall
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libegl-mesa0:i386 libegl1:i386 libgbm1:i386 libgles2:i386 libnvidia-eglcore libnvidia-eglcore:i386 libwayland-client0:i386 libwayland-server0:i386
  linux-image-4.12.0-2-amd64 linux-image-4.13.0-1-amd64
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
5 not fully installed or removed.
Need to get 0 B/11.2 kB of archives.
After this operation, 0 B of additional disk space will be used.
(Reading database ... 525146 files and directories currently installed.)
Preparing to unpack .../glx-diversions_0.8.3_amd64.deb ...
Unpacking glx-diversions (0.8.3) over (0.8.3) ...
Setting up glx-diversions (0.8.3) ...
Processing triggers for glx-alternative-mesa (0.8.3) ...
update-alternatives: updating alternative /usr/lib/mesa-diverted because link group glx has changed slave links
Setting up glx-alternative-nvidia (0.8.3) ...
Processing triggers for glx-alternative-nvidia (0.8.3) ...
Setting up nvidia-alternative (390.48-3) ...
Processing triggers for nvidia-alternative (390.48-3) ...
update-alternatives: using /usr/lib/nvidia/current to provide /usr/lib/nvidia/nvidia (nvidia) in auto mode
Setting up libnvidia-cfg1:amd64 (390.48-3) ...
Setting up libglx-nvidia0:amd64 (390.48-3) ...
Processing triggers for libc-bin (2.27-3) ...
Processing triggers for update-glx (0.8.3) ...
Processing triggers for glx-alternative-nvidia (0.8.3) ...
update-alternatives: using /usr/lib/nvidia to provide /usr/lib/glx (glx) in auto mode
Processing triggers for libc-bin (2.27-3) ...
Processing triggers for initramfs-tools (0.130) ...
update-initramfs: Generating /boot/initrd.img-4.16.0-1-amd64
W: Possible missing firmware /lib/firmware/i915/skl_dmc_ver1_27.bin for module i915
W: Possible missing firmware /lib/firmware/i915/kbl_dmc_ver1_04.bin for module i915
W: Possible missing firmware /lib/firmware/i915/kbl_guc_ver9_39.bin for module i915
W: Possible missing firmware /lib/firmware/i915/bxt_guc_ver9_29.bin for module i915
W: Possible missing firmware /lib/firmware/i915/skl_guc_ver9_33.bin for module i915

$ sudo apt-get remove nvidia-alternative
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  glx-alternative-nvidia libegl-mesa0:i386 libegl1:i386 libgbm1:i386 libgles2:i386 libnvidia-eglcore libnvidia-eglcore:i386 libnvidia-glcore
  libwayland-client0:i386 libwayland-server0:i386 linux-image-4.12.0-2-amd64 linux-image-4.13.0-1-amd64
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
  libglx-nvidia0 libnvidia-cfg1 nvidia-alternative nvidia-persistenced nvidia-vulkan-icd
0 upgraded, 0 newly installed, 5 to remove and 0 not upgraded.
After this operation, 2,497 kB disk space will be freed.
Do you want to continue? [Y/n] 
(Reading database ... 525184 files and directories currently installed.)
Removing nvidia-vulkan-icd:amd64 (390.48-3) ...
Removing libglx-nvidia0:amd64 (390.48-3) ...
Removing nvidia-persistenced (390.25-1) ...
Removing libnvidia-cfg1:amd64 (390.48-3) ...
Removing nvidia-alternative (390.48-3) ...
Processing triggers for glx-alternative-nvidia (0.8.3) ...
Processing triggers for libc-bin (2.27-3) ...
Processing triggers for man-db (2.8.3-2) ...
Processing triggers for update-glx (0.8.3) ...
Processing triggers for glx-alternative-nvidia (0.8.3) ...
update-alternatives: warning: forcing reinstallation of alternative /usr/lib/nvidia because link group glx is broken
update-alternatives: warning: skip creation of /usr/lib/x86_64-linux-gnu/libnvidia-cfg.so.1 because associated file /usr/lib/x86_64-linux-gnu/nvidia/libnvidia-cfg.so.1 (of link group glx) doesn't exist
update-alternatives: warning: skip creation of /etc/modprobe.d/nvidia-blacklists-nouveau.conf because associated file /etc/nvidia/nvidia-blacklists-nouveau.conf (of link group glx) doesn't exist
update-alternatives: warning: skip creation of /etc/modules-load.d/nvidia.conf because associated file /etc/nvidia/nvidia-load.conf (of link group glx) doesn't exist
update-alternatives: warning: skip creation of /etc/modprobe.d/nvidia.conf because associated file /etc/nvidia/nvidia-modprobe.conf (of link group glx) doesn't exist
update-alternatives: using /usr/lib/mesa-diverted to provide /usr/lib/glx (glx) in auto mode
Processing triggers for libc-bin (2.27-3) ...
Processing triggers for initramfs-tools (0.130) ...
update-initramfs: Generating /boot/initrd.img-4.16.0-1-amd64
W: Possible missing firmware /lib/firmware/i915/skl_dmc_ver1_27.bin for module i915
W: Possible missing firmware /lib/firmware/i915/kbl_dmc_ver1_04.bin for module i915
W: Possible missing firmware /lib/firmware/i915/kbl_guc_ver9_39.bin for module i915
W: Possible missing firmware /lib/firmware/i915/bxt_guc_ver9_29.bin for module i915
W: Possible missing firmware /lib/firmware/i915/skl_guc_ver9_33.bin for module i915

$ sudo apt-get remove glx-alternative-nvidia
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libegl-mesa0:i386 libegl1:i386 libgbm1:i386 libgles2:i386 libnvidia-eglcore libnvidia-eglcore:i386 libnvidia-glcore libwayland-client0:i386
  libwayland-server0:i386 linux-image-4.12.0-2-amd64 linux-image-4.13.0-1-amd64
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
  glx-alternative-nvidia
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
After this operation, 47.1 kB disk space will be freed.
Do you want to continue? [Y/n] 
(Reading database ... 525128 files and directories currently installed.)
Removing glx-alternative-nvidia (0.8.3) ...

관련 정보