即使我是以root身份登录的,下面是我在执行升级时遇到的冲突:
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)发布于 2017-09-01 19:42:32
至于您在dkms中有错误,我建议您作为第一个操作过程,在研究错误的核心根源之前检查它是否真正需要dkms。
通常,dkms用于(Re)自动编译/安装附加模块,而不是在安装了新内核版本的包后属于默认内核。例如,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 dkmshttps://unix.stackexchange.com/questions/389833
复制相似问题