无法升级内核

无法升级内核

尝试升级我的软件不起作用,因为它显示以下消息:

sudo apt-get update && sudo apt-get upgrade -y
[...]
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 discord : Depends: libappindicator1 but it is not installed
           Depends: libc++1 but it is not installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

现在,当我尝试修复损坏的依赖关系时:

sudo apt-get install -f
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
  libappindicator1 libc++1 libc++abi1 libindicator7
Suggested packages:
  clang
The following packages will be REMOVED:
  linux-image-extra-4.10.0-26-generic
The following NEW packages will be installed:
  libappindicator1 libc++1 libc++abi1 libindicator7
0 upgraded, 4 newly installed, 1 to remove and 45 not upgraded.
2 not fully installed or removed.
Need to get 0 B/288 kB of archives.
After this operation, 154 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 259278 files and directories currently installed.)
Removing linux-image-extra-4.10.0-26-generic (4.10.0-26.30) ...
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.10.0-26-generic /boot/vmlinuz-4.10.0-26-generic
run-parts: executing /etc/kernel/postinst.d/dkms 4.10.0-26-generic /boot/vmlinuz-4.10.0-26-generic

它就停在那里,几个小时都没有发生任何事。

更新:新问题

我开始觉得自己有点笨了。在我设法解决了上述问题之后,我今天尝试进行升级,但我又卡在同一行:

sudo apt-get dist-upgrade -y
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages were automatically installed and are no longer required:
  libuchardet0 libva-wayland1 mpv rtmpdump
Use 'sudo apt autoremove' to remove them.
The following NEW packages will be installed:
  linux-headers-4.10.0-32 linux-headers-4.10.0-32-generic linux-image-4.10.0-32-generic linux-image-extra-4.10.0-32-generic linux-signed-image-4.10.0-32-generic
The following packages will be upgraded:
  linux-generic linux-headers-generic linux-image-generic linux-signed-generic linux-signed-image-generic
5 upgraded, 5 newly installed, 0 to remove and 0 not upgraded.
Need to get 61,5 MB of archives.
After this operation, 308 MB of additional disk space will be used.
Get:1 http://de.archive.ubuntu.com/ubuntu zesty-updates/main amd64 linux-image-4.10.0-32-generic amd64 4.10.0-32.36 [20,2 MB]
Get:2 http://de.archive.ubuntu.com/ubuntu zesty-updates/main amd64 linux-image-extra-4.10.0-32-generic amd64 4.10.0-32.36 [30,0 MB]
Get:3 http://de.archive.ubuntu.com/ubuntu zesty-updates/main amd64 linux-generic amd64 4.10.0.32.32 [1.784 B]                                                                                                     
Get:4 http://de.archive.ubuntu.com/ubuntu zesty-updates/main amd64 linux-image-generic amd64 4.10.0.32.32 [2.306 B]                                                                                               
Get:5 http://de.archive.ubuntu.com/ubuntu zesty-updates/main amd64 linux-signed-image-4.10.0-32-generic amd64 4.10.0-32.36 [4.018 B]                                                                              
Get:6 http://de.archive.ubuntu.com/ubuntu zesty-updates/main amd64 linux-signed-generic amd64 4.10.0.32.32 [1.816 B]                                                                                              
Get:7 http://de.archive.ubuntu.com/ubuntu zesty-updates/main amd64 linux-signed-image-generic amd64 4.10.0.32.32 [2.340 B]                                                                                        
Get:8 http://de.archive.ubuntu.com/ubuntu zesty-updates/main amd64 linux-headers-4.10.0-32 all 4.10.0-32.36 [10,6 MB]                                                                                             
Get:9 http://de.archive.ubuntu.com/ubuntu zesty-updates/main amd64 linux-headers-4.10.0-32-generic amd64 4.10.0-32.36 [688 kB]                                                                                    
Get:10 http://de.archive.ubuntu.com/ubuntu zesty-updates/main amd64 linux-headers-generic amd64 4.10.0.32.32 [2.278 B]                                                                                            
Fetched 61,5 MB in 13s (4.631 kB/s)                                                                                                                                                                               
Selecting previously unselected package linux-image-4.10.0-32-generic.
(Reading database ... 258420 files and directories currently installed.)
Preparing to unpack .../0-linux-image-4.10.0-32-generic_4.10.0-32.36_amd64.deb ...
Examining /etc/kernel/preinst.d/
run-parts: executing /etc/kernel/preinst.d/intel-microcode 4.10.0-32-generic /boot/vmlinuz-4.10.0-32-generic
Done.
Unpacking linux-image-4.10.0-32-generic (4.10.0-32.36) ...
Selecting previously unselected package linux-image-extra-4.10.0-32-generic.
Preparing to unpack .../1-linux-image-extra-4.10.0-32-generic_4.10.0-32.36_amd64.deb ...
Unpacking linux-image-extra-4.10.0-32-generic (4.10.0-32.36) ...
Preparing to unpack .../2-linux-generic_4.10.0.32.32_amd64.deb ...
Unpacking linux-generic (4.10.0.32.32) over (4.10.0.30.31) ...
Preparing to unpack .../3-linux-image-generic_4.10.0.32.32_amd64.deb ...
Unpacking linux-image-generic (4.10.0.32.32) over (4.10.0.30.31) ...
Selecting previously unselected package linux-signed-image-4.10.0-32-generic.
Preparing to unpack .../4-linux-signed-image-4.10.0-32-generic_4.10.0-32.36_amd64.deb ...
Unpacking linux-signed-image-4.10.0-32-generic (4.10.0-32.36) ...
Preparing to unpack .../5-linux-signed-generic_4.10.0.32.32_amd64.deb ...
Unpacking linux-signed-generic (4.10.0.32.32) over (4.10.0.30.31) ...
Preparing to unpack .../6-linux-signed-image-generic_4.10.0.32.32_amd64.deb ...
Unpacking linux-signed-image-generic (4.10.0.32.32) over (4.10.0.30.31) ...
Selecting previously unselected package linux-headers-4.10.0-32.
Preparing to unpack .../7-linux-headers-4.10.0-32_4.10.0-32.36_all.deb ...
Unpacking linux-headers-4.10.0-32 (4.10.0-32.36) ...
Selecting previously unselected package linux-headers-4.10.0-32-generic.
Preparing to unpack .../8-linux-headers-4.10.0-32-generic_4.10.0-32.36_amd64.deb ...
Unpacking linux-headers-4.10.0-32-generic (4.10.0-32.36) ...
Preparing to unpack .../9-linux-headers-generic_4.10.0.32.32_amd64.deb ...
Unpacking linux-headers-generic (4.10.0.32.32) over (4.10.0.30.31) ...
Setting up linux-headers-4.10.0-32 (4.10.0-32.36) ...
Setting up linux-image-4.10.0-32-generic (4.10.0-32.36) ...
Running depmod.
update-initramfs: deferring update (hook will be called later)
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.10.0-32-generic /boot/vmlinuz-4.10.0-32-generic
run-parts: executing /etc/kernel/postinst.d/dkms 4.10.0-32-generic /boot/vmlinuz-4.10.0-32-generic

答案1

因此它似乎linux-image-extra-4.10.0-26-generic是一个无法删除的“损坏”包,因此我手动删除了该条目/var/lib/dpkg/status并且我的 dpkg 再次工作了......

我在这里找到了答案: http://www.iasptk.com/ubuntu-fix-broken-package-best-solution/

更新

我的“第二个”问题的解决方案:

https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1686107

将 GPU 更改为内置 Intel 而不是 NVIDIA-GPU 后,我就可以进行更新了。所以我不明白这个问题,但至少我设法解决了它……

相关内容