Erros Apt-Get; Não consigo instalar nada

1

Quando eu executo sudo apt-get upgrade i recebo esse erro

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages were automatically installed and are no longer required:
  linux-image-3.13.0-63-generic linux-image-3.13.0-65-generic
  linux-image-3.13.0-73-generic
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED:
  linux-image-extra-3.13.0-63-generic linux-image-extra-3.13.0-65-generic
  linux-image-extra-3.13.0-67-generic linux-image-extra-3.13.0-73-generic
  linux-image-extra-3.13.0-74-generic
0 upgraded, 0 newly installed, 5 to remove and 0 not upgraded.
10 not fully installed or removed.
After this operation, 759 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 507628 files and directories currently installed.)
Removing linux-image-extra-3.13.0-63-generic (3.13.0-63.103) ...
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 3.13.0-63-generic /boot/vmlinuz-3.13.0-63-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.13.0-63-generic /boot/vmlinuz-3.13.0-63-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.13.0-63-generic /boot/vmlinuz-3.13.0-63-generic
update-initramfs: Generating /boot/initrd.img-3.13.0-63-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-63-generic with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
dpkg: error processing package linux-image-extra-3.13.0-63-generic (--remove):
 subprocess installed post-removal script returned error exit status 1
Removing linux-image-extra-3.13.0-65-generic (3.13.0-65.106) ...
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/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
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-65-generic with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
dpkg: error processing package linux-image-extra-3.13.0-65-generic (--remove):
 subprocess installed post-removal script returned error exit status 1
Removing linux-image-extra-3.13.0-67-generic (3.13.0-67.110) ...
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 3.13.0-67-generic /boot/vmlinuz-3.13.0-67-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.13.0-67-generic /boot/vmlinuz-3.13.0-67-generic
update-initramfs: Generating /boot/initrd.img-3.13.0-67-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-67-generic with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
dpkg: error processing package linux-image-extra-3.13.0-67-generic (--remove):
 subprocess installed post-removal script returned error exit status 1
Removing linux-image-extra-3.13.0-73-generic (3.13.0-73.116) ...
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 3.13.0-73-generic /boot/vmlinuz-3.13.0-73-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.13.0-73-generic /boot/vmlinuz-3.13.0-73-generic
update-initramfs: Generating /boot/initrd.img-3.13.0-73-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-73-generic with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
dpkg: error processing package linux-image-extra-3.13.0-73-generic (--remove):
 subprocess installed post-removal script returned error exit status 1
No apport report written because MaxReports is reached already
                                                              Removing linux-image-extra-3.13.0-74-generic (3.13.0-74.118) ...
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 3.13.0-74-generic /boot/vmlinuz-3.13.0-74-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.13.0-74-generic /boot/vmlinuz-3.13.0-74-generic
update-initramfs: Generating /boot/initrd.img-3.13.0-74-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-74-generic with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
No apport report written because MaxReports is reached already
                                                              dpkg: error processing package linux-image-extra-3.13.0-74-generic (--remove):
 subprocess installed post-removal script returned error exit status 1
Errors were encountered while processing:
 linux-image-extra-3.13.0-63-generic
 linux-image-extra-3.13.0-65-generic
 linux-image-extra-3.13.0-67-generic
 linux-image-extra-3.13.0-73-generic
 linux-image-extra-3.13.0-74-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)

Esta é a saída para stat /var/tmp; mktemp /var/tmp/mkinitramfs-FW_XXXXXX

stat: cannot stat ‘/var/tmp’: No such file or directory
mktemp: failed to create file via template ‘/var/tmp/mkinitramfs-FW_XXXXXX’: No such file or directory

Instalar qualquer outra coisa através de apt-get também falha. Por favor ajude!

    
por bubunyo 25.12.2015 / 11:35

1 resposta

2

Seu /var/tmp pode não existir e TMPDIR env pode não ser definido por acaso. Nesse caso, initramfs cria o arquivo mkinitramfs-FW_XXXXXX em /tmp em vez de /var/tmp , mas mktemp ainda procura por /var/tmp .

Agora você deve recriar seu /var/tmp :

sudo mkdir /var/tmp
sudo chmod 777 /var/tmp
    
por Tung Tran 25.12.2015 / 14:41