执行 sudo apt-get upgrade 时出现错误

执行 sudo apt-get upgrade 时出现错误
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... The following packages were automatically installed and are no longer required:
  libntdb1 linux-image-generic-lts-vivid linux-signed-image-generic-lts-vivid python-ntdb thermald
Use 'apt-get autoremove' to remove them.
Done
The following packages have been kept back:
  libgbm1 xorg
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
1 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 oem-wireless-dw1550-1160187-dkms (6.30.223.64somerville1) ...
Removing old oem-wireless-dw1550-1160187-6.30.223.64somerville1 DKMS files...

------------------------------
Deleting module version: 6.30.223.64somerville1
completely from the DKMS tree.
------------------------------
Done.
Loading new oem-wireless-dw1550-1160187-6.30.223.64somerville1 DKMS files...
First Installation: checking all kernels...
Building only for 3.19.0-49-generic
Building for architecture x86_64
Building initial module for 3.19.0-49-generic
ERROR: Cannot create report: [Errno 17] File exists: '/var/crash/oem-wireless-dw1550-1160187-dkms.0.crash'
Error! Bad return status for module build on kernel: 3.19.0-49-generic (x86_64)
Consult /var/lib/dkms/oem-wireless-dw1550-1160187/6.30.223.64somerville1/build/make.log for more information.
dpkg: error processing package oem-wireless-dw1550-1160187-dkms (--configure):
 subprocess installed post-installation script returned error exit status 10
Errors were encountered while processing:
 oem-wireless-dw1550-1160187-dkms
E: Sub-process /usr/bin/dpkg returned an error code (1)

答案1

您安装了来自以前 Ubuntu 版本的一些旧内核,当 DKMS 尝试为其编译内核模块时,会导致兼容性问题。您应该删除它们。

从...开始

sudo apt-get purge -f 'linux-*-3.19*'

和/或参见如何删除旧内核版本来清理启动菜单?

Apt 可能会因为未配置的软件包而拒绝删除这些软件包(因为无法为它们编译内核模块)。在这种情况下,请更新您的问题,说明您尝试执行的操作以及过程中遇到的任何错误消息,然后在此答案的评论部分中联系我。

答案2

看起来之前的版本崩溃了,我会删除崩溃文件(参见下面一行中的路径)并尝试另一次升级。

[Errno 17] 文件存在:'/var/crash/oem-wireless-dw1550-1160187-dkms.0.crash'

如果构建仍然崩溃,我会咨询/var/lib/dkms/oem-wireless-dw1550-1160187/6.30.223.64somerville1/build/make.log以了解更多详细信息。

相关内容