루트로 로그인했는데도 업그레이드를 수행하려고 할 때 발생하는 충돌은 다음과 같습니다.
root@:/home/frederic# apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
3 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up linux-headers-4.9.0-3-amd64 (4.9.30-2+deb9u3) ...
/etc/kernel/header_postinst.d/dkms:
Error! You must be root to use this command.
run-parts: /etc/kernel/header_postinst.d/dkms exited with return code 1
Failed to process /etc/kernel/header_postinst.d at /var/lib/dpkg/info/linux-headers-4.9.0-3-amd64.postinst line 11.
dpkg: error processing package linux-headers-4.9.0-3-amd64 (--configure):
subprocess installed post-installation script returned error exit status 1
Setting up linux-image-4.9.0-3-amd64 (4.9.30-2+deb9u3) ...
/etc/kernel/postinst.d/dkms:
Error! You must be root to use this command.
run-parts: /etc/kernel/postinst.d/dkms exited with return code 1
dpkg: error processing package linux-image-4.9.0-3-amd64 (--configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of linux-image-amd64:
linux-image-amd64 depends on linux-image-4.9.0-3-amd64; however:
Package linux-image-4.9.0-3-amd64 is not configured yet.
dpkg: error processing package linux-image-amd64 (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
linux-headers-4.9.0-3-amd64
linux-image-4.9.0-3-amd64
linux-image-amd64
E: Sub-process /usr/bin/dpkg returned an error code (1)
제가 보기엔 문제가 있는 것 같습니다dkms패키지를 다시 설치하려고 해도 나아지지 않습니다.
root@:/home/frederic# apt-get install --reinstall dkms
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
3 not fully installed or removed.
Need to get 0 B/74.8 kB of archives.
After this operation, 0 B of additional disk space will be used.
(Reading database ... 142800 files and directories currently installed.)
Preparing to unpack .../archives/dkms_2.3-2_all.deb ...
Unpacking dkms (2.3-2) over (2.3-2) ...
Setting up linux-headers-4.9.0-3-amd64 (4.9.30-2+deb9u3) ...
/etc/kernel/header_postinst.d/dkms:
Error! You must be root to use this command.
run-parts: /etc/kernel/header_postinst.d/dkms exited with return code 1
Failed to process /etc/kernel/header_postinst.d at /var/lib/dpkg/info/linux-headers-4.9.0-3-amd64.postinst line 11.
dpkg: error processing package linux-headers-4.9.0-3-amd64 (--configure):
subprocess installed post-installation script returned error exit status 1
Setting up dkms (2.3-2) ...
Processing triggers for man-db (2.7.6.1-2) ...
Setting up linux-image-4.9.0-3-amd64 (4.9.30-2+deb9u3) ...
/etc/kernel/postinst.d/dkms:
Error! You must be root to use this command.
run-parts: /etc/kernel/postinst.d/dkms exited with return code 1
dpkg: error processing package linux-image-4.9.0-3-amd64 (--configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of linux-image-amd64:
linux-image-amd64 depends on linux-image-4.9.0-3-amd64; however:
Package linux-image-4.9.0-3-amd64 is not configured yet.
dpkg: error processing package linux-image-amd64 (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
linux-headers-4.9.0-3-amd64
linux-image-4.9.0-3-amd64
linux-image-amd64
E: Sub-process /usr/bin/dpkg returned an error code (1)
답변1
오류가 발생한 경우 dkms
첫 번째 조치는 dkms
오류의 핵심 원인을 조사하는 데 시간을 낭비하기 전에 실제로 필요한지 확인하는 것입니다.
일반적 dkms
으로 새 커널 버전으로 패키지를 설치한 후 기본 커널의 일부가 아닌 추가 모듈을 자동으로 (재)컴파일/설치하는 데 사용됩니다. 예를 들어 sysdig
모듈이나 Realtek 드라이버, 이전 Debian 버전에서는 VMware vmtools 모듈이 있습니다.
요청에서 볼 수 있듯이 ls -la /var/lib/dkms
(보통 소스 코드가 있는 (하위)디렉터리) 컴파일할 추가 모듈이 없습니다.
따라서 우리는 dkms가 이 시스템에서 유용한 작업을 수행하지 않는다는 것을 알고 있습니다.
ls -la /var/lib/dkms
total 12
drwxr-xr-x 2 root root 4096 Sep 1 11:53 .
drwxr-xr-x 46 root root 4096 Aug 30 16:18 ..
-rw-r--r-- 1 root root 6 Aug 31 2016 dkms_dbversion
따라서 권장되는 조치는 다음 명령을 사용하여 제거하는 것입니다.
sudo aptitude purge dkms