Eu tenho um grande problema com um dos servidores.
Eu preciso instalar o firefox para selenium2. Quando eu digito:
apt-get install firefox
Eu tenho saída:
Do you want to continue? [Y/n]
Get:1 http://nova.clouds.archive.ubuntu.com/ubuntu xenial/main amd64 libjbig0 amd64 2.1-3.1 [26.6 kB]
Get:2 http://nova.clouds.archive.ubuntu.com/ubuntu xenial/main amd64 libvpx3 amd64 1.5.0-2ubuntu1 [732 kB]
Get:3 http://nova.clouds.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libxpm4 amd64 1:3.5.11-1ubuntu0.16.04.1 [33.8 kB]
Get:4 http://nova.clouds.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libgd3 amd64 2.1.1-4ubuntu0.16.04.8 [126 kB]
Get:5 http://nova.clouds.archive.ubuntu.com/ubuntu xenial-updates/main amd64 firefox amd64 59.0.2+build1-0ubuntu0.16.04.1 [44.6 MB]
Fetched 45.5 MB in 36s (1,262 kB/s)
Extracting templates from packages: 100%
(Reading database ... 141165 files and directories currently installed.)
Removing linux-image-4.4.0-62-generic (4.4.0-62.83) ...
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 4.4.0-62-generic /boot/vmlinuz-4.4.0-62-generic
update-initramfs: Deleting /boot/initrd.img-4.4.0-62-generic
run-parts: executing /etc/kernel/postrm.d/x-grub-legacy-ec2 4.4.0-62-generic /boot/vmlinuz-4.4.0-62-generic
Searching for GRUB installation directory ... found: /boot/grub
/usr/sbin/update-grub-legacy-ec2: line 85: awk: command not found
Cannot determine root device. Assuming /dev/hda1
This error is probably caused by an invalid /etc/fstab
/usr/sbin/update-grub-legacy-ec2: line 85: awk: command not found
/usr/sbin/update-grub-legacy-ec2: line 375: awk: command not found
run-parts: /etc/kernel/postrm.d/x-grub-legacy-ec2 exited with return code 127
Failed to process /etc/kernel/postrm.d at /var/lib/dpkg/info/linux-image-4.4.0-62-generic.postrm line 328.
dpkg: error processing package linux-image-4.4.0-62-generic (--remove):
subprocess installed post-removal script returned error exit status 1
Errors were encountered while processing:
linux-image-4.4.0-62-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)
Então, se eu acho que preciso instalar o awk corretamente.
Então eu digito:
apt-get install original-awk
Mas isso resulta em um erro semelhante:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
linux-image-4.4.0-62-generic
The following NEW packages will be installed:
original-awk
0 upgraded, 1 newly installed, 1 to remove and 0 not upgraded.
28 not fully installed or removed.
Need to get 69.0 kB of archives.
After this operation, 64.6 MB disk space will be freed.
Do you want to continue? [Y/n]
Get:1 http://nova.clouds.archive.ubuntu.com/ubuntu xenial/universe amd64 original-awk amd64 2012-12-20-5 [69.0 kB]
Fetched 69.0 kB in 1s (59.6 kB/s)
(Reading database ... 141165 files and directories currently installed.)
Removing linux-image-4.4.0-62-generic (4.4.0-62.83) ...
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 4.4.0-62-generic /boot/vmlinuz-4.4.0-62-generic
update-initramfs: Deleting /boot/initrd.img-4.4.0-62-generic
run-parts: executing /etc/kernel/postrm.d/x-grub-legacy-ec2 4.4.0-62-generic /boot/vmlinuz-4.4.0-62-generic
Searching for GRUB installation directory ... found: /boot/grub
/usr/sbin/update-grub-legacy-ec2: line 85: awk: command not found
Cannot determine root device. Assuming /dev/hda1
This error is probably caused by an invalid /etc/fstab
/usr/sbin/update-grub-legacy-ec2: line 85: awk: command not found
/usr/sbin/update-grub-legacy-ec2: line 375: awk: command not found
run-parts: /etc/kernel/postrm.d/x-grub-legacy-ec2 exited with return code 127
Failed to process /etc/kernel/postrm.d at /var/lib/dpkg/info/linux-image-4.4.0-62-generic.postrm line 328.
dpkg: error processing package linux-image-4.4.0-62-generic (--remove):
subprocess installed post-removal script returned error exit status 1
Errors were encountered while processing:
linux-image-4.4.0-62-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)
Além disso, apt-get upgrade
apresenta o mesmo erro. O que eu posso fazer?
uname -a
return:
Linux vps395796 4.4.0-98-generic #121-Ubuntu SMP Tue Oct 10 14:24:03 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux.
EDITAR:
Não funciona.
Instalar com o flag --fix-broken dá os mesmos erros de antes:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
linux-image-4.4.0-62-generic
The following NEW packages will be installed:
original-awk
0 upgraded, 1 newly installed, 1 to remove and 0 not upgraded.
28 not fully installed or removed.
Need to get 0 B/69.0 kB of archives.
After this operation, 64.6 MB disk space will be freed.
Do you want to continue? [Y/n]
(Reading database ... 141165 files and directories currently installed.)
Removing linux-image-4.4.0-62-generic (4.4.0-62.83) ...
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 4.4.0-62-generic /boot/vmlinuz-4.4.0-62-generic
update-initramfs: Deleting /boot/initrd.img-4.4.0-62-generic
run-parts: executing /etc/kernel/postrm.d/x-grub-legacy-ec2 4.4.0-62-generic /boot/vmlinuz-4.4.0-62-generic
Searching for GRUB installation directory ... found: /boot/grub
/usr/sbin/update-grub-legacy-ec2: line 85: awk: command not found
Cannot determine root device. Assuming /dev/hda1
This error is probably caused by an invalid /etc/fstab
/usr/sbin/update-grub-legacy-ec2: line 85: awk: command not found
/usr/sbin/update-grub-legacy-ec2: line 375: awk: command not found
run-parts: /etc/kernel/postrm.d/x-grub-legacy-ec2 exited with return code 127
Failed to process /etc/kernel/postrm.d at /var/lib/dpkg/info/linux-image-4.4.0-62-generic.postrm line 328.
dpkg: error processing package linux-image-4.4.0-62-generic (--remove):
subprocess installed post-removal script returned error exit status 1
Errors were encountered while processing:
linux-image-4.4.0-62-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)
dpkg --remover linux-image-4.4.0-62-erros genéricos de retrun também:
(Reading database ... 141165 files and directories currently installed.)
Removing linux-image-4.4.0-62-generic (4.4.0-62.83) ...
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 4.4.0-62-generic /boot/vmlinuz-4.4.0-62-generic
update-initramfs: Deleting /boot/initrd.img-4.4.0-62-generic
run-parts: executing /etc/kernel/postrm.d/x-grub-legacy-ec2 4.4.0-62-generic /boot/vmlinuz-4.4.0-62-generic
Searching for GRUB installation directory ... found: /boot/grub
/usr/sbin/update-grub-legacy-ec2: line 85: awk: command not found
Cannot determine root device. Assuming /dev/hda1
This error is probably caused by an invalid /etc/fstab
/usr/sbin/update-grub-legacy-ec2: line 85: awk: command not found
/usr/sbin/update-grub-legacy-ec2: line 375: awk: command not found
run-parts: /etc/kernel/postrm.d/x-grub-legacy-ec2 exited with return code 127
Failed to process /etc/kernel/postrm.d at /var/lib/dpkg/info/linux-image-4.4.0-62-generic.postrm line 328.
dpkg: error processing package linux-image-4.4.0-62-generic (--remove):
subprocess installed post-removal script returned error exit status 1
Errors were encountered while processing:
linux-image-4.4.0-62-generic