首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在Debian 9中执行升级时出错

在Debian 9中执行升级时出错
EN

Unix & Linux用户
提问于 2017-09-01 17:53:16
回答 1查看 849关注 0票数 4

即使我是以root身份登录的,下面是我在执行升级时遇到的冲突:

代码语言:javascript
复制
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软件包似乎有问题,但是当我试图重新安装它时,它并不是更好:

代码语言:javascript
复制
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)
EN

回答 1

Unix & Linux用户

回答已采纳

发布于 2017-09-01 19:42:32

至于您在dkms中有错误,我建议您作为第一个操作过程,在研究错误的核心根源之前检查它是否真正需要dkms

通常,dkms用于(Re)自动编译/安装附加模块,而不是在安装了新内核版本的包后属于默认内核。例如,sysdig模块或realtek驱动程序,或者在旧的Debian版本中,使用VMware vmtools模块。

正如我们从请求中看到的那样,ls -la /var/lib/dkms没有需要在其中编译的额外模块(通常是带有源代码的子目录)。

因此,我们知道dkms在这台机器上没有做任何有用的事情。

代码语言:javascript
复制
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

因此,建议的行动方针是卸载它,命令如下:

代码语言:javascript
复制
sudo aptitude purge dkms
票数 5
EN
页面原文内容由Unix & Linux提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://unix.stackexchange.com/questions/389833

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档