當我執行 sudo apt-get update 時出現錯誤

當我執行 sudo apt-get update 時出現錯誤
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 可能會因為未配置的軟體包而拒絕刪除這些軟體包(因為無法為它們編譯核心模組)。在這種情況下,請用您嘗試執行的操作以及在此過程中遇到的任何錯誤訊息來更新您的問題,並在此答案的評論部分中對我進行 ping 操作。

答案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更多細節。

相關內容