我尝试使用 升级我的 14.04 服务器dist-upgrade
。不幸的是,更新失败了,在手动修改了一些损坏的软件包之后,我有点束手无策了。
我已经尝试手动清理所有3.13.0-39
软件包/var/lib/dpkg/info/
,/var/lib/dpkg/status
因为自动清除/卸载的方法都行不通。之后我再次尝试安装它,但不幸的是它失败了,并出现了与之前完全相同的错误:
Setting up linux-image-3.13.0-39-generic (3.13.0-39.66) ...
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-39-generic
vmlinuz(/boot/vmlinuz-3.13.0-39-generic
) points to /boot/vmlinuz-3.13.0-39-generic
(/boot/vmlinuz-3.13.0-39-generic) -- doing nothing at /var/lib/dpkg/info/linux-image-3.13.0-39-generic.postinst line 491.
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 3.13.0-39-generic /boot/vmlinuz-3.13.0-39-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.13.0-39-generic /boot/vmlinuz-3.13.0-39-generic
update-initramfs: Generating /boot/initrd.img-3.13.0-39-generic
mktemp: failed to create file via template ‘/var/tmp/mkinitramfs-FW_XXXXXX’: No such file or directory
update-initramfs: failed for /boot/initrd.img-3.13.0-39-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-39-generic.postinst line 1025.
dpkg: error processing package linux-image-3.13.0-39-generic (--configure):
subprocess installed post-installation script returned error exit status 2
dpkg: dependency problems prevent configuration of linux-image-extra-3.13.0-39-generic:
linux-image-extra-3.13.0-39-generic depends on linux-image-3.13.0-39-generic; however:
Package linux-image-3.13.0-39-generic is not configured yet.
dpkg: error processing package linux-image-extra-3.13.0-39-generic (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
dpkg: dependency problems prevent configuration of linux-image-generic:
linux-image-generic depends on linux-image-3.13.0-39-generic; however:
Package linux-image-3.13.0-39-generic is not configured yet.
linux-image-generic depends on linux-image-extra-3.13.0-39-generic; however:
Package linux-image-extra-3.13.0-39-generic is not configured yet.
dpkg: error processing package linux-image-generic (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
dpkg: dependency problems prevent configuration of linux-generic:
linux-generic depends on linux-image-generic (= 3.13.0.39.46); however:
Package linux-image-generic is not configured yet.
dpkg: error processing package linux-generic (--configure):
dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
Errors were encountered while processing:
linux-image-3.13.0-39-generic
linux-image-extra-3.13.0-39-generic
linux-image-generic
linux-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)
这是我尝试安装时的输出linux-generic
。我还清/boot
除了旧内核,输出如下df -h
:
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/duproject-root 18G 4.0G 13G 25% /
none 4.0K 0 4.0K 0% /sys/fs/cgroup
udev 991M 12K 991M 1% /dev
tmpfs 201M 556K 200M 1% /run
none 5.0M 0 5.0M 0% /run/lock
none 1001M 0 1001M 0% /run/shm
none 100M 0 100M 0% /run/user
/dev/sda1 228M 47M 170M 22% /boot
我有点没主意了,谷歌搜索只会返回标准答案=/
答案1
我刚刚修好了。由于某些未知原因,我的/var/tmp
不存在,我的TMPDIR
环境未设置。这导致 initramfs 创建了mkinitramfs-FW_XXXXXX
文件,/tmp
但mktemp
仍在 中查找它/var/tmp
。我重新创建/var/tmp
并设置TMPDIR
,它运行良好 =)