Eu tinha apt-get autoremove
ativado para manter a limpeza. Depois disso, quando eu usei o apt-get install
para instalar um pacote, ele primeiro tentou desinstalar os arquivos antigos do kernel do linux no meu computador e, em seguida, emitiu muitos erros, a saída da sessão está aqui:
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)
e o pacote que solicitei não pôde ser instalado. Aqui está o log do 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
Meu kernel é 3.13.0-105-generic
, tentei desativar o autoremove
adicionando o arquivo apt.conf
em /etc/apt
:
~/temp$ cat /etc/apt/apt.conf
APT::Get::AutomaticRemove "0";
APT::Get::HideAutoRemove "1";
mas não funcionou. Então, como posso resolver este problema?