我对 Ubuntu 还是个新手,在尝试更新内核时遇到了一些问题。
我已遵循以下说明这尝试更新内核但总是卡在这里:
Setting up linux-image-4.9.35-040935-generic (4.9.35-040935.201706290837) ...
Running depmod.
update-initramfs: deferring update (hook will be called later)
The link /initrd.img is a dangling linkto /boot/initrd.img-4.9.35-040935-generic
vmlinuz(/boot/vmlinuz-4.9.35-040935-generic
) points to /boot/vmlinuz-4.9.35-040935-generic
(/boot/vmlinuz-4.9.35-040935-generic) -- doing nothing at /var/lib/dpkg/info/linux-image-4.9.35-040935-generic.postinst line 491.
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.9.35-040935-generic /boot/vmlinuz-4.9.35-040935-generic
run-parts: executing /etc/kernel/postinst.d/dkms 4.9.35-040935-generic /boot/vmlinuz-4.9.35-040935-generic
然后它又重复了第一个错误。我发现这一页有一些建议。运行sudo apt-get update –fix-missing
后我得到了以下结果:
W: The repository 'http://ppa.launchpad.net/floe/beignet/ubuntu xenial Release' does not have a Release file.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: Failed to fetch http://ppa.launchpad.net/floe/beignet/ubuntu/dists/xenial/main/binary-amd64/Packages 404 Not Found
E: Some index files failed to download. They have been ignored, or old ones used instead.
运行sudo apt-get install -f
(有时尝试更新或安装某些东西时)会出现以下情况:
E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem.
~$ sudo apt-get install -f
E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem.
~$ sudo dpkg --configure -a
Setting up linux-image-4.9.35-040935-generic (4.9.35-040935.201706290837) ...
Running depmod.
update-initramfs: deferring update (hook will be called later)
The link /initrd.img is a dangling linkto /boot/initrd.img-4.9.35-040935-generic
vmlinuz(/boot/vmlinuz-4.9.35-040935-generic
) points to /boot/vmlinuz-4.9.35-040935-generic
(/boot/vmlinuz-4.9.35-040935-generic) -- doing nothing at /var/lib/dpkg/info/linux-image-4.9.35-040935-generic.postinst line 491.
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.9.35-040935-generic /boot/vmlinuz-4.9.35-040935-generic
run-parts: executing /etc/kernel/postinst.d/dkms 4.9.35-040935-generic /boot/vmlinuz-4.9.35-040935-generic
这让我想起了第一个错误。我有点担心手动编辑 dpkg 状态因为这听起来我可能会意外地引起更多问题。
如果有任何区别,我在 Windows 上的 Ubuntu 上运行 Bash,这是我检查当前内核版本时得到的结果。
~$ uname -r
4.4.0-43-Microsoft
~$ uname -a
Linux LAPTOP-CMEAJ743 4.4.0-43-Microsoft #1-Microsoft Wed Dec 31 14:42:53 PST 2014 x86_64 x86_64 x86_64 GNU/Linux