当我输入 sudo apt upgrade 时,我收到此消息
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
linux-image-5.13.0-40-generic : Depends: linux-modules-5.13.0-40-generic but it is not going to be installed
E: Broken packages
我尝试了谷歌的解决方案,但没有效果。我是新手,请解释一下。我也无法使用键盘更改亮度。编辑 1:
我试过 sudo apt update
Hit:1 http://in.archive.ubuntu.com/ubuntu focal InRelease
Hit:2 http://in.archive.ubuntu.com/ubuntu focal-updates InRelease
Hit:3 http://in.archive.ubuntu.com/ubuntu focal-backports InRelease
Hit:4 http://security.ubuntu.com/ubuntu focal-security InRelease
Reading package lists... Done
Building dependency tree
Reading state information... Done
8 packages can be upgraded. Run 'apt list --upgradable' to see them.
我尝试过 apt list --upgradable
Listing... Done
dpkg-dev/focal-security,focal-security 1.19.7ubuntu3.2 all [upgradable from: 1.19.7ubuntu3]
dpkg/focal-security 1.19.7ubuntu3.2 amd64 [upgradable from: 1.19.7ubuntu3]
gir1.2-javascriptcoregtk-4.0/focal-security 2.36.2-0ubuntu0.20.04.1 amd64 [upgradable from: 2.36.0-0ubuntu0.20.04.3]
gir1.2-webkit2-4.0/focal-security 2.36.2-0ubuntu0.20.04.1 amd64 [upgradable from: 2.36.0-0ubuntu0.20.04.3]
libdpkg-perl/focal-security,focal-security 1.19.7ubuntu3.2 all [upgradable from: 1.19.7ubuntu3]
libjavascriptcoregtk-4.0-18/focal-security 2.36.2-0ubuntu0.20.04.1 amd64 [upgradable from: 2.36.0-0ubuntu0.20.04.3]
libwebkit2gtk-4.0-37/focal-security 2.36.2-0ubuntu0.20.04.1 amd64 [upgradable from: 2.36.0-0ubuntu0.20.04.3]
orca/focal-security,focal-security 3.36.2-1ubuntu1~20.04.2 all [upgradable from: 3.36.2-1ubuntu1~20.04.1]
sudo apt 安装 linux-modules-5.13.0-40-generic
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
linux-modules-5.13.0-40-generic
0 upgraded, 1 newly installed, 0 to remove and 8 not upgraded.
3 not fully installed or removed.
Need to get 0 B/28.5 MB of archives.
After this operation, 100 MB of additional disk space will be used.
Selecting previously unselected package linux-modules-5.13.0-40-generic.
(Reading database ... 187741 files and directories currently installed.)
Preparing to unpack .../linux-modules-5.13.0-40-generic_5.13.0-40.45~20.04.1_amd
64.deb ...
Unpacking linux-modules-5.13.0-40-generic (5.13.0-40.45~20.04.1) ...
dpkg: dependency problems prevent configuration of linux-modules-5.13.0-40-gener
ic:
linux-modules-5.13.0-40-generic depends on linux-image-5.13.0-40-generic | linu
x-image-unsigned-5.13.0-40-generic; however:
Package linux-image-5.13.0-40-generic is not installed.
Package linux-image-unsigned-5.13.0-40-generic is not installed.
dpkg: error processing package linux-modules-5.13.0-40-generic (--configure):
dependency problems - leaving unconfigured
Setting up linux-image-5.13.0-41-generic (5.13.0-41.46~20.04.1) ...
No apport report written because the error message indicates its a followup erro
r from a previous failure.
Setting up linux-image-5.13.0-44-generic (5.13.0-44.49
~20.04.1) ...
Processing triggers for linux-image-5.13.0-41-generic (5.13.0-41.46~20.04.1) ...
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-5.13.0-41-generic
/etc/kernel/postinst.d/zz-update-grub:
Sourcing file `/etc/default/grub'
/usr/sbin/grub-mkconfig: 34: /etc/default/grub: Syntax error: EOF in backquote s
ubstitution
run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code 2
dpkg: error processing package linux-image-5.13.0-41-generic (--configure):
installed linux-image-5.13.0-41-generic package post-installation script subpro
cess returned error exit status 1
Processing triggers for linux-image-5.13.0-44-generic (5.13.0-44.49~20.04.1) ...
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-5.13.0-44-generic
/etc/kernel/postinst.d/zz-update-grub:
Sourcing file `/etc/default/grub'
/usr/sbin/grub-mkconfig: 34: /etc/default/grub: Syntax error: EOF in backquote s
ubstitution
run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code 2
dpkg: error processing package linux-image-5.13.0-44-generic (--configure):
installed linux-image-5.13.0-44-generic package post-installation script subpro
cess returned error exit status 1
Errors were encountered while processing:
linux-modules-5.13.0-40-generic
linux-image-5.13.0-41-generic
linux-image-5.13.0-44-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)
DF-H;DF-I
Filesystem Size Used Avail Use% Mounted on
udev 7.5G 0 7.5G 0% /dev
tmpfs 1.6G 2.3M 1.6G 1% /run
/dev/nvme0n1p6 46G 39G 5.0G 89% /
tmpfs 7.6G 0 7.6G 0% /dev/shm
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 7.6G 0 7.6G 0% /sys/fs/cgroup
/dev/nvme0n1p1 256M 33M 224M 13% /boot/efi
/dev/loop0 128K 128K 0 100% /snap/bare/5
/dev/loop2 45M 45M 0 100% /snap/snapd/15904
/dev/loop1 228M 228M 0 100% /snap/code/96
/dev/loop3 62M 62M 0 100% /snap/core20/1494
/dev/loop4 111M 111M 0 100% /snap/core/12834
/dev/loop5 220M 220M 0 100% /snap/code/97
/dev/loop6 45M 45M 0 100% /snap/snapd/15534
/dev/loop7 82M 82M 0 100% /snap/gtk-common-themes/1534
/dev/loop8 62M 62M 0 100% /snap/core20/1434
/dev/loop9 112M 112M 0 100% /snap/core/13250
/dev/loop10 66M 66M 0 100% /snap/gtk-common-themes/1519
/dev/loop11 55M 55M 0 100% /snap/snap-store/558
tmpfs 1.6G 20K 1.6G 1% /run/user/125
/dev/loop12 249M 249M 0 100% /snap/gnome-3-38-2004/99
tmpfs 1.6G 60K 1.6G 1% /run/user/1000
Filesystem Inodes IUsed IFree IUse% Mounted on
udev 1964052 637 1963415 1% /dev
tmpfs 1972933 1176 1971757 1% /run
/dev/nvme0n1p6 3055616 400215 2655401 14% /
tmpfs 1972933 1 1972932 1% /dev/shm
tmpfs 1972933 5 1972928 1% /run/lock
tmpfs 1972933 19 1972914 1% /sys/fs/cgroup
/dev/nvme0n1p1 0 0 0 - /boot/efi
/dev/loop0 29 29 0 100% /snap/bare/5
/dev/loop2 484 484 0 100% /snap/snapd/15904
/dev/loop1 3914 3914 0 100% /snap/code/96
/dev/loop3 11789 11789 0 100% /snap/core20/1494
/dev/loop4 12847 12847 0 100% /snap/core/12834
/dev/loop5 3914 3914 0 100% /snap/code/97
/dev/loop6 484 484 0 100% /snap/snapd/15534
/dev/loop7 76177 76177 0 100% /snap/gtk-common-themes/1534
/dev/loop8 11789 11789 0 100% /snap/core20/1434
/dev/loop9 12848 12848 0 100% /snap/core/13250
/dev/loop10 65095 65095 0 100% /snap/gtk-common-themes/1519
/dev/loop11 17311 17311 0 100% /snap/snap-store/558
tmpfs 1972933 45 1972888 1% /run/user/125
/dev/loop12 17495 17495 0 100% /snap/gnome-3-38-2004/99
tmpfs 1972933 104 1972829 1% /run/user/1000
sudo dpkg --configure -a && sudo apt -f install
dpkg: dependency problems prevent configuration of linux-modules-5.13.0-40-generic:
linux-modules-5.13.0-40-generic depends on linux-image-5.13.0-40-generic | linux-image-unsigned-5.13.0-40-generic; however:
Package linux-image-5.13.0-40-generic is not installed.
Package linux-image-unsigned-5.13.0-40-generic is not installed.
dpkg: error processing package linux-modules-5.13.0-40-generic (--configure):
dependency problems - leaving unconfigured
Setting up linux-image-5.13.0-41-generic (5.13.0-41.46~20.04.1) ...
Setting up linux-image-5.13.0-44-generic (5.13.0-44.49~20.04.1) ...
Processing triggers for linux-image-5.13.0-41-generic (5.13.0-41.46~20.04.1) ...
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-5.13.0-41-generic
/etc/kernel/postinst.d/zz-update-grub:
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.13.0-44-generic
Found initrd image: /boot/initrd.img-5.13.0-44-generic
Found linux image: /boot/vmlinuz-5.13.0-41-generic
Found initrd image: /boot/initrd.img-5.13.0-41-generic
Found Windows Boot Manager on /dev/nvme0n1p1@/EFI/Microsoft/Boot/bootmgfw.efi
Adding boot menu entry for UEFI Firmware Settings
done
Processing triggers for linux-image-5.13.0-44-generic (5.13.0-44.49~20.04.1) ...
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-5.13.0-44-generic
/etc/kernel/postinst.d/zz-update-grub:
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.13.0-44-generic
Found initrd image: /boot/initrd.img-5.13.0-44-generic
Found linux image: /boot/vmlinuz-5.13.0-41-generic
Found initrd image: /boot/initrd.img-5.13.0-41-generic
Found Windows Boot Manager on /dev/nvme0n1p1@/EFI/Microsoft/Boot/bootmgfw.efi
Adding boot menu entry for UEFI Firmware Settings
done
Errors were encountered while processing:
linux-modules-5.13.0-40-generic
答案1
两个不同的原因。您的 /etc/default/grub 已不再损坏。并且您的 /boot 现已满了。 /boot 中的可用空间