AWS Ubuntu14.04 实例 mktemp 升级失败

AWS Ubuntu14.04 实例 mktemp 升级失败

在 AWS 上使用 Ubuntu14 进行升级时遇到了问题。这似乎与完整 /boot 等问题不同。我该如何纠正这个问题?

Setting up initramfs-tools (0.103ubuntu4.2) ...
update-initramfs: deferring update (trigger activated)
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
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-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-virtual:
 linux-image-virtual 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-virtual (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
                                                                                                          Processing triggers for initramfs-tools (0.103ubuntu4.2) ...
update-initramfs: Generating /boot/initrd.img-3.13.0-29-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-29-generic with 1.
dpkg: error processing package initramfs-tools (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 linux-image-3.13.0-35-generic
 linux-image-virtual
 initramfs-tools
E: Sub-process /usr/bin/dpkg returned an error code (1)

答案1

我刚刚在 Debian 机器上解决了同样的问题。这不是内存问题(清理了超过 2G 的内存后才发现)。

您可能只是缺少/var/tmp目录。

无法通过模板“/var/tmp/mkinitramfs-FW_XXXXXX”创建文件

  1. ls -l /var/tmp
  2. 如果找不到则执行sudo mkdir /var/tmp
  3. 再次运行vmware-install.pl

如果你想清理磁盘以释放内存,请运行

su /usr/bin/bleachbit

这将释放大量占用的 tmp 和缓存文件空间。您可以从下拉菜单中运行 Bleachbit(抱歉,我在 Debian 机器上,所以我不知道它在 Ubuntu 上的位置)。但这不是以 root 身份运行的,因此您会收到很多访问被拒绝的语句。

祝你好运

相关内容