Я получаю следующую ошибку при запуске обновления dpkg через командную строку на моем сервере Ubuntu и не знаю, как ее решить
2019-02-03 06:25:32 INFO: no packages to update
E:Sub-process /usr/bin/dpkg returned an error code (1)
2019-02-03 06:26:01 ERROR: installArchives() failed
2019-02-03 06:26:01 ERROR: Exited with returncode 1.
При запуске dpkg -l я вижу следующие плохие пакеты
ii linux-image-4.15.0-42-generic 4.15.0-42.45 amd64 Signed kernel image generic
iF linux-image-4.15.0-43-generic 4.15.0-43.46 amd64 Signed kernel image generic
iF linux-image-4.15.0-44-generic 4.15.0-44.47 amd64 Signed kernel image generic
iF linux-image-4.15.0-45-generic 4.15.0-45.48 amd64 Signed kernel image generic
Я использую сервер Plesk в Ubuntu 18.04, если это полезно
Результаты df
Filesystem Size Used Avail Use% Mounted on
udev 478M 0 478M 0% /dev
tmpfs 99M 716K 98M 1% /run
/dev/vda1 25G 7.2G 17G 30% /
tmpfs 493M 8.0K 493M 1% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 493M 0 493M 0% /sys/fs/cgroup
/dev/vda15 105M 3.6M 101M 4% /boot/efi
/dev/sda 25G 14G 11G 57% /mnt/volume_sfo2_01
tmpfs 99M 0 99M 0% /run/user/0
Удалить пакеты
dpkg: error processing package linux-image-4.15.0-45-generic (--remove):
installed linux-image-4.15.0-45-generic package post-removal script subprocess returned error exit status 1
Errors were encountered while processing:
linux-image-4.15.0-43-generic
linux-image-4.15.0-44-generic
linux-image-4.15.0-45-generic
Аудит Вывод
# sudo dpkg --audit linux-image-4.15.0-45-generic
The following packages are only half configured, probably due to problems
configuring them the first time. The configuration should be retried using
dpkg --configure <package> or the configure menu option in dselect:
linux-image-4.15.0-45-generic Signed kernel image generic
Продувочный выход
# sudo dpkg --purge linux-image-4.15.0-45-generic
dpkg: dependency problems prevent removal of linux-image-4.15.0-45-generic:
linux-image-virtual depends on linux-image-4.15.0-45-generic.
dpkg: error processing package linux-image-4.15.0-45-generic (--purge):
dependency problems - not removing
Errors were encountered while processing:
linux-image-4.15.0-45-generic
Ниже приведен сценарий после установки. Я проверил упомянутые каталоги, и они все существуют, однако некоторые из перечисленных модулей отсутствуют, как вы можете видеть с ls внизу
cat /var/lib/dpkg/info/linux-image-4.15.0-45-generic.postrm
#!/bin/sh
set -e
version=4.15.0-45-generic
image_path=/boot/vmlinuz-$version
rm -f /lib/modules/$version/.fresh-install
if [ "$1" != upgrade ] && command -v linux-update-symlinks >/dev/null; then
linux-update-symlinks remove $version $image_path
fi
if [ -d /etc/kernel/postrm.d ]; then
# We cannot trigger ourselves as at the end of this we will no longer
# exist and can no longer respond to the trigger. The trigger would
# then become lost. Therefore we clear any pending trigger and apply
# postrm directly.
if [ -f /usr/lib/linux/triggers/$version ]; then
echo "$0 ... removing pending trigger"
rm -f /usr/lib/linux/triggers/$version
rmdir --ignore-fail-on-non-empty /usr/lib/linux/triggers
fi
DEB_MAINT_PARAMS="$*" run-parts --report --exit-on-error --arg=$version \
--arg=$image_path /etc/kernel/postrm.d
fi
if [ "$1" = purge ]; then
for extra_file in modules.dep modules.isapnpmap modules.pcimap \
modules.usbmap modules.parportmap \
modules.generic_string modules.ieee1394map \
modules.ieee1394map modules.pnpbiosmap \
modules.alias modules.ccwmap modules.inputmap \
modules.symbols modules.ofmap \
modules.seriomap modules.\*.bin \
modules.softdep modules.devname; do
eval rm -f /lib/modules/$version/$extra_file
done
rmdir /lib/modules/$version || true
fi
exit 0
root@serv1:~# cd /lib/modules/4.15.0-45-generic
root@serv1:/lib/modules/4.15.0-45-generic# ls
build modules.alias.bin modules.dep.bin modules.symbols
initrd modules.builtin modules.devname modules.symbols.bin
kernel modules.builtin.bin modules.order vdso
modules.alias modules.dep modules.softdep
root@serv1:/lib/modules/4.15.0-45-generic#