當前位置: 首頁>>技術教程>>正文


dpkg:錯誤處理包linux-image-generic( – configure):依賴問題 – 保持未配置狀態

, , ,

問題描述

dpkg --configure -a

Setting up linux-image-3.13.0-35-generic (3.13.0-35.62) ...
Running depmod.
update-initramfs: deferring update (hook will be called later)
The link /initrd.img is a dangling linkto /boot/initrd.img-3.13.0-35-generic
vmlinuz(/boot/vmlinuz-3.13.0-35-generic
) points to /boot/vmlinuz-3.13.0-35-generic
 (/boot/vmlinuz-3.13.0-35-generic) -- doing nothing at /var/lib/dpkg/info/linux-image-3.13.0-35-generic.postinst line 491.
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 3.13.0-35-generic /boot/vmlinuz-3.13.0-35-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.13.0-35-generic /boot/vmlinuz-3.13.0-35-generic
update-initramfs: Generating /boot/initrd.img-3.13.0-35-generic

gzip: stdout: No space left on device
E: mkinitramfs failure cpio 141 gzip 1
update-initramfs: failed for /boot/initrd.img-3.13.0-35-generic with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
Failed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux-image-3.13.0-35-generic.postinst line 1025.
dpkg: error processing package linux-image-3.13.0-35-generic (--configure):
 subprocess installed post-installation script returned error exit status 2
dpkg: dependency problems prevent configuration of linux-image-extra-3.13.0-35-generic:
 linux-image-extra-3.13.0-35-generic depends on linux-image-3.13.0-35-generic; however:
  Package linux-image-3.13.0-35-generic is not configured yet.

dpkg: error processing package linux-image-extra-3.13.0-35-generic (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-image-generic:
 linux-image-generic depends on linux-image-3.13.0-35-generic; however:
  Package linux-image-3.13.0-35-generic is not configured yet.
 linux-image-generic depends on linux-image-extra-3.13.0-35-generic; however:
  Package linux-image-extra-3.13.0-35-generic is not configured yet.

dpkg: error processing package linux-image-generic (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 linux-image-3.13.0-35-generic
 linux-image-extra-3.13.0-35-generic
 linux-image-generic

最佳解決辦法

我剛才有這個問題。我做的是在我的情況下使用dpkg清除錯誤的包然後更新並強製重新安裝:

sudo dpkg --purge linux-image-3.13.0-35-generic
sudo apt-get update
sudo apt-get -f install

安裝過程可能需要更長的時間,但最終有效。

次佳解決辦法

你的問題是:

update-initramfs: Generating /boot/initrd.img-3.16.0-43-generic

gzip: stdout: No space left on device
E: mkinitramfs failure cpio 141 gzip 1

解:

apt-get autoremove

第三種解決辦法

對我來說,解決方案是不同的。

我使用命令sudo aptitude,當出現圖形菜單時,我使用/獲取pop-up搜索字段並查找所有linux-header, linux-image, linux-server版本並刪除除-當前未使用的版本以外的所有版本。

為了找到當前的內核版本,我使用了uname -r

最後,我按照指定的順序安裝了較新版本的linux-{header, image, server},方法是選擇它們並按+

為了確認更新,我使用了u

最後我重新啟動,一切都修好了。

參考資料

本文由Ubuntu問答整理, 博文地址: https://ubuntuqa.com/zh-tw/article/6945.html,未經允許,請勿轉載。