내 서버 중 하나에 큰 문제가 있습니다. Selenium2용 Firefox를 설치해야 합니다. 내가 입력할 때:
apt-get Firefox 설치
나는 출력을 얻습니다 :
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)
따라서 그것이 맞다고 생각되면 awk를 설치해야 합니다. 그래서 나는 다음을 입력합니다:
apt-get은 원본 awk를 설치합니다.
하지만 이로 인해 다음과 같은 오류가 발생합니다.
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)
또한 apt-get upgrade
동일한 오류가 발생합니다. 어떡해?
uname -a
반품:
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.
편집: 이것은 작동하지 않습니다. --fix-broken 플래그를 사용하여 설치하면 이전과 동일한 오류가 발생합니다.
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 --remove linux-image-4.4.0-62-generic 재실행 오류:
(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
답변1
문제는 APT가 먼저 시스템에서 보류 중인 트랜잭션을 완료하려고 시도한다는 것입니다. 귀하의 경우 이는 더 이상 사용되지 않는 오래된 커널을 제거하는 것을 의미합니다. 그런데 "awk"가 빠져서 이 단계가 깨졌네요...
다음 방법을 시도하여 시스템을 복구할 수 있습니다.
$ sudo apt-get install --fix-broken original-awk
여전히 실패하면 패키지를 수동으로 제거해 보십시오.
$ sudo dpkg --remove linux-image-4.4.0-62-generic
이들 중 하나가 시스템을 수정하고 패키지 설치를 계속할 수 있기를 바랍니다.