为什么每次我使用 apt-get install 安装某些东西时都会出现错误?

为什么每次我使用 apt-get install 安装某些东西时都会出现错误?

每次我安装某些东西时,我都会收到此消息:Errors were encountered while processing: linux-image-5.8.0-36-generic E: Sub-process /usr/bin/dpkg returned an error code (1)除了此错误消息之外,一切似乎都正常(包括已安装的项目),我只是不明白为什么会收到此错误代码。

nicpo@nicpo-Alienware-15:~$ sudo apt install sublime-text
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  linux-headers-5.4.0-42 linux-headers-5.4.0-42-generic
  linux-image-5.4.0-42-generic linux-modules-5.4.0-42-generic
  linux-modules-extra-5.4.0-42-generic
  linux-modules-nvidia-440-5.4.0-42-generic
Use 'sudo apt autoremove' to remove them.
The following NEW packages will be installed:
  sublime-text
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
Need to get 9,835 kB of archives.
After this operation, 34.8 MB of additional disk space will be used.
Get:1 https://download.sublimetext.com apt/stable/ sublime-text 3211 [9,835 kB]
Fetched 9,835 kB in 1s (10.7 MB/s)        
Selecting previously unselected package sublime-text.
(Reading database ... 257393 files and directories currently installed.)
Preparing to unpack .../sublime-text_3211_amd64.deb ...
Unpacking sublime-text (3211) ...
Setting up sublime-text (3211) ...
Setting up linux-image-5.8.0-36-generic (5.8.0-36.40~20.04.1) ...
Processing triggers for mime-support (3.64ubuntu1) ...
Processing triggers for hicolor-icon-theme (0.17-2) ...
Processing triggers for gnome-menus (3.36.0-1ubuntu1) ...
Processing triggers for desktop-file-utils (0.24-1ubuntu3) ...
Processing triggers for linux-image-5.8.0-36-generic (5.8.0-36.40~20.04.1) ...
/etc/kernel/postinst.d/dkms:
 * dkms: running auto installation service for kernel 5.8.0-36-generic
   ...done.
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-5.8.0-36-generic
I: The initramfs will attempt to resume from /dev/sda9
I: (UUID=3a851f36-1c68-465e-95a2-693435f02472)
I: Set the RESUME variable to override this.
/etc/kernel/postinst.d/zz-update-grub:
Sourcing file `/etc/default/grub'
/usr/sbin/grub-mkconfig: 10: /etc/default/grub: nouveau.modeset=0: not found
run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code 127
dpkg: error processing package linux-image-5.8.0-36-generic (--configure):
 installed linux-image-5.8.0-36-generic package post-installation script subproc
ess returned error exit status 1
Errors were encountered while processing:
 linux-image-5.8.0-36-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)

相关内容