apt-get autoremove
为了保持清洁,我打开了。之后当我apt-get install
安装软件包时,它首先尝试卸载我电脑上的旧 linux 内核文件,然后输出一大堆错误,会话输出如下:
sudo apt-get install dconf-editor
正在读取软件包列表... 完成
下列软件包将被【卸载】:
linux-image-extra-3.13.0-65-generic linux-image-extra-3.13.0-68-generic
linux-image-extra-3.13.0-70-generic linux-image-extra-3.13.0-71-generic
linux-image-extra-3.13.0-73-generic linux-image-extra-3.13.0-74-generic
linux-image-extra-3.13.0-79-generic linux-image-extra-3.13.0-83-generic
linux-image-extra-3.13.0-85-generic linux-image-extra-3.13.0-86-generic
linux-image-extra-3.13.0-95-generic linux-image-extra-3.13.0-96-generic
linux-image-extra-3.13.0-98-generic
下列【新】软件包将被安装:
dconf-editor
升级了 0 个软件包,新安装了 1 个软件包,要卸载 13 个软件包,有 356 个软件包未被升级。
有 16 个软件包没有被完全安装或卸载。
需要下载 0 B/100 kB 的软件包。
解压缩后将会空出 1,975 MB 的空间。
您希望继续执行吗? [Y/n] y
正在卸载 linux-image-extra-3.13.0-65-generic (3.13.0-65.106) ...
depmod: FATAL: could not load /boot/System.map-3.13.0-65-generic: No such file or directory
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 3.13.0-65-generic /boot/vmlinuz-3.13.0-65-generic
run-parts: executing /etc/kernel/postinst.d/dkms 3.13.0-65-generic /boot/vmlinuz-3.13.0-65-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.13.0-65-generic /boot/vmlinuz-3.13.0-65-generic
update-initramfs: Generating /boot/initrd.img-3.13.0-65-generic
grep: /boot/config-3.13.0-65-generic: 没有那个文件或目录
depmod: WARNING: could not open /tmp/mkinitramfs_v3e1AB/lib/modules/3.13.0-65-generic/modules.order: No such file or directory
depmod: WARNING: could not open /tmp/mkinitramfs_v3e1AB/lib/modules/3.13.0-65-generic/modules.builtin: No such file or directory
run-parts: executing /etc/kernel/postinst.d/pm-utils 3.13.0-65-generic /boot/vmlinuz-3.13.0-65-generic
run-parts: executing /etc/kernel/postinst.d/update-notifier 3.13.0-65-generic /boot/vmlinuz-3.13.0-65-generic
run-parts: executing /etc/kernel/postinst.d/zz-runlilo 3.13.0-65-generic /boot/vmlinuz-3.13.0-65-generic
Added Linux + *
Fatal: open /boot/vmlinuz-3.13.0-103-generic: No such file or directory
run-parts: /etc/kernel/postinst.d/zz-runlilo exited with return code 1
dpkg: 处理软件包 linux-image-extra-3.13.0-65-generic (--remove)时出错:
子进程 已安装 post-removal 脚本 返回了错误号 1
正在卸载 linux-image-extra-3.13.0-68-generic (3.13.0-68.111) ...
...
正在卸载 linux-image-extra-3.13.0-70-generic (3.13.0-70.113) ...
...
...
在处理时有错误发生:
linux-image-extra-3.13.0-65-generic
linux-image-extra-3.13.0-68-generic
linux-image-extra-3.13.0-70-generic
linux-image-extra-3.13.0-71-generic
linux-image-extra-3.13.0-73-generic
linux-image-extra-3.13.0-74-generic
linux-image-extra-3.13.0-79-generic
linux-image-extra-3.13.0-83-generic
linux-image-extra-3.13.0-85-generic
linux-image-extra-3.13.0-86-generic
linux-image-extra-3.13.0-95-generic
linux-image-extra-3.13.0-96-generic
linux-image-extra-3.13.0-98-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)
并且无法安装我请求的软件包。以下是 apt 的日志:
Start-Date: 2017-03-13 19:00:09
Commandline: apt-get install dconf-editor
Install: dconf-editor:amd64 (0.20.0-1)
Remove: linux-image-extra-3.13.0-85-generic:amd64 (3.13.0-85.129), linux-image-extra-3.13.0-65-generic:amd64 (3.13.0-65.106), linux-image-extra-3.13.0-74-generic:amd64 (3.13.0-74.118), linux-image-extra-3.13.0-83-generic:amd64 (3.13.0-83.127), linux-image-extra-3.13.0-70-generic:amd64 (3.13.0-70.113), linux-image-extra-3.13.0-79-generic:amd64 (3.13.0-79.123), linux-image-extra-3.13.0-68-generic:amd64 (3.13.0-68.111), linux-image-extra-3.13.0-86-generic:amd64 (3.13.0-86.131), linux-image-extra-3.13.0-95-generic:amd64 (3.13.0-95.142), linux-image-extra-3.13.0-73-generic:amd64 (3.13.0-73.116), linux-image-extra-3.13.0-71-generic:amd64 (3.13.0-71.114), linux-image-extra-3.13.0-98-generic:amd64 (3.13.0-98.145), linux-image-extra-3.13.0-96-generic:amd64 (3.13.0-96.143)
Error: Sub-process /usr/bin/dpkg returned an error code (1)
End-Date: 2017-03-13 19:06:41
我的内核是3.13.0-105-generic
,我曾尝试autoremove
通过添加apt.conf
文件来禁用/etc/apt
:
~/temp$ cat /etc/apt/apt.conf
APT::Get::AutomaticRemove "0";
APT::Get::HideAutoRemove "1";
但它不起作用。那么我该如何解决这个问题呢?