更新ubuntu内核的问题

niwlg2el  于 11个月前  发布在  其他
关注(0)|答案(2)|浏览(122)

我已经在Virtual Box上安装了Ubuntu 16.04.4 LTS。我在更新内核时遇到了一些问题,我不知道如何修复它们!阅读其他人的回答我试过了

sudo apt-get update

字符串

sudo apt-get upgrade


这是报告

Lettura elenco dei pacchetti... Fatto
Generazione albero delle dipendenze       
Lettura informazioni sullo stato... Fatto
Calcolo dell'aggiornamento... Fatto
I seguenti pacchetti saranno RIMOSSI:
linux-image-extra-4.10.0-28-generic
0 aggiornati, 0 installati, 1 da rimuovere e 0 non aggiornati.
5 non completamente installati o rimossi.
Dopo quest'operazione, verranno liberati 156 MB di spazio su disco.
Continuare? [S/n] S
(Lettura del database... 232826 file e directory attualmente installati.)
Rimozione di linux-image-extra-4.10.0-28-generic (4.10.0-28.32~16.04.2)...
depmod: ERROR: failed to load symbols from /lib/modules/4.10.0-28-generic/misc/vboxvideo.ko: Invalid argument
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.10.0-28-generic /boot/vmlinuz-4.10.0-28-generic
run-parts: executing /etc/kernel/postinst.d/dkms 4.10.0-28-generic /boot/vmlinuz-4.10.0-28-generic
Error! Your kernel headers for kernel 4.10.0-28-generic cannot be found.
Please install the linux-headers-4.10.0-28-generic package,
or use the --kernelsourcedir option to tell DKMS where it's located
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.10.0-28-generic /boot/vmlinuz-4.10.0-28-generic
update-initramfs: Generating /boot/initrd.img-4.10.0-28-generic
run-parts: executing /etc/kernel/postinst.d/pm-utils 4.10.0-28-generic /boot/vmlinuz-4.10.0-28-generic
run-parts: executing /etc/kernel/postinst.d/unattended-upgrades 4.10.0-28-generic /boot/vmlinuz-4.10.0-28-generic
run-parts: executing /etc/kernel/postinst.d/update-notifier 4.10.0-28-generic /boot/vmlinuz-4.10.0-28-generic
run-parts: executing /etc/kernel/postinst.d/vboxadd 4.10.0-28-generic /boot/vmlinuz-4.10.0-28-generic
run-parts: failed to exec /etc/kernel/postinst.d/vboxadd: Exec format error
run-parts: /etc/kernel/postinst.d/vboxadd exited with return code 1
dpkg: errore nell'elaborare il pacchetto linux-image-extra-4.10.0-28-generic (--remove):
il sottoprocesso installato script di post-removal ha restituito lo stato di errore 1
Si sono verificati degli errori nell'elaborazione:
linux-image-extra-4.10.0-28-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)


感谢大家的帮助!

jaxagkaj

jaxagkaj1#

解决了!我按照这个网站上的说明解决了我的内核问题(我必须删除var/lib/dpkg/status中损坏的包的引用)。
这里的网站与答案
https://askubuntu.com/questions/1014322/how-to-fix-configuration-issues-of-an-old-kernel-in-order-to-make-upgrade-possib

fzsnzjdm

fzsnzjdm2#

尽管TO能够解决这个问题,我想建议一个更简单的方法,为我工作,并避免麻烦修改dkpg管理器文件。也许这是明智的,不太危险,先尝试。
最近,我在虚拟机上遇到了类似的问题。apt拒绝更新或安装任何带有以下错误消息的软件包:

...
    /etc/kernel/postinst.d/vboxadd:
    run-parts: failed to exec /etc/kernel/postinst.d/vboxadd: Exec format error
    run-parts: /etc/kernel/postinst.d/vboxadd exited with return code 1
    ...

字符串
文件/etc/kernel/postinst.d/vboxadd原来是空的我的虚拟机.这使我的想法,VirtualBox GuestAdditions被打破.事实上,简单地重新安装GuestAdditions后,适当的问题消失了.

相关问题