小编Yer*_*ray的帖子

dpkg --configure -a 找到 initrd 映像时挂起

我有一个带有 GitLab 的 Ubuntu 14.04 LTS“桌面”。该系统在Windows Server 2012 R2上的虚拟机中运行。

机器每天运行“重要安全更新”、“推荐更新”和“不支持更新”的自动更新。不适用于“预发布更新”。

今天我登录系统,运行“sudo apt-get update”,但它无法完成,因为某些进程正在使用 dpkg。

我已经运行了“sudo apt-get update”并且它已更新但挂在:

Found linux image: /boot/vmlinuz-3.19.0-39-generic
Found initrd image: /boot/initrd.img.3.19.0-39-generic
Found linux image: /boot/vmlinuz-3.19.0-37-generic
Found initrd image: /boot/initrd.img.3.19.0-37-generic
Found linux image: /boot/vmlinuz-3.19.0-33-generic
Found initrd image: /boot/initrd.img.3.19.0-33-generic
Found linux image: /boot/vmlinuz-3.19.0-32-generic
Found initrd image: /boot/initrd.img.3.19.0-32-generic
Found linux image: /boot/vmlinuz-3.19.0-31-generic
Found initrd image: /boot/initrd.img.3.19.0-31-generic
Run Code Online (Sandbox Code Playgroud)

我重新启动并在同一点再次挂起“sudo apt-get升级”。

然后我尝试清理未使用的内核。我跑:

uname -r
Run Code Online (Sandbox Code Playgroud)

并得到:

3.19.0-39-generic
Run Code Online (Sandbox Code Playgroud)

所以我删除了 3.19.0-31、3.19.0-32 和 3.19.0-33:

sudo rm /boot/initrd.img.3.19.0-31-generic
sudo rm /boot/initrd.img.3.19.0-32-generic
sudo rm /boot/initrd.img.3.19.0-33-generic
sudo rm /boot/vmlinuz-3.19.0-31-generic …
Run Code Online (Sandbox Code Playgroud)

apt dpkg

5
推荐指数
2
解决办法
4768
查看次数

标签 统计

apt ×1

dpkg ×1