![更新管理器:“检查更新时出现问题。”](https://linux22.com/image/1007641/%E6%9B%B4%E6%96%B0%E7%AE%A1%E7%90%86%E5%99%A8%EF%BC%9A%E2%80%9C%E6%A3%80%E6%9F%A5%E6%9B%B4%E6%96%B0%E6%97%B6%E5%87%BA%E7%8E%B0%E9%97%AE%E9%A2%98%E3%80%82%E2%80%9D%20.png)
尝试此命令后,sudo software-properties-gtk
我得到了以下回溯:
Traceback (most recent call last):
File "/usr/bin/software-properties-gtk", line 32, in <module>
import aptsources
ImportError: No module named aptsources
另外,我的选项卡上的小红圆上有一个白线,图标卡住了,没有响应。最后,系统设置 > 软件和更新,然后双击也没有响应。
编辑
我遵循了 Joshua Besneatte 给出的代码
sudo apt install --fix-missing --fix-broken
sudo apt update && sudo apt dist-upgrade
sudo apt install --reinstall software-properties-gtk
输入完后我得到了这个回溯sudo apt update && sudo apt dist-upgrade
Traceback (most recent call last):
File "/usr/lib/update-notifier/package-data-downloader", line 24, in <module>
import debian.deb822
ImportError: No module named debian.deb822
dpkg: error processing package update-notifier-common (--unpack):
subprocess installed post-installation script returned error exit status 1
E: Sub-process /usr/bin/dpkg returned an error code (1)
键入后出现此错误sudo apt install --reinstall software-properties-gtk
SyntaxError: Non-ASCII character '\xc2' in file /usr/bin/py3clean on line 4, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details
dpkg: warning: subprocess old pre-removal script returned error exit status 1
dpkg: trying script from the new package instead ...
File "/usr/bin/py3clean", line 4
SyntaxError: Non-ASCII character '\xc2' in file /usr/bin/py3clean on line 4, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details
dpkg: error processing archive /var/cache/apt/archives/software-properties-gtk_0.96.20.7_all.deb (--unpack):
subprocess new pre-removal script returned error exit status 1
File "/usr/bin/py3compile", line 4
SyntaxError: Non-ASCII character '\xc2' in file /usr/bin/py3compile on line 4, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details
dpkg: error while cleaning up:
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
/var/cache/apt/archives/software-properties-gtk_0.96.20.7_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
然后我又试了一次sudo apt install --fix-missing --fix-broken
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
18 not fully installed or removed.
Need to get 0 B/47.2 kB of archives.
After this operation, 0 B of additional disk space will be used.
Setting up update-notifier-common (3.168.8) ...
Traceback (most recent call last):
File "/usr/lib/update-notifier/package-data-downloader", line 24, in <module>
import debian.deb822
ImportError: No module named debian.deb822
dpkg: error processing package update-notifier-common (--configure):
subprocess installed post-installation script returned error exit status 1
Setting up distro-info-data (0.28ubuntu0.8) ...
Setting up wget (1.17.1-1ubuntu1.4) ...
Setting up libqpdf21:amd64 (8.0.2-3~16.04.1) ...
Setting up cups-filters-core-drivers (1.8.3-2ubuntu3.4) ...
Setting up cups-filters (1.8.3-2ubuntu3.4) ...
dpkg: dependency problems prevent configuration of flashplugin-installer:
flashplugin-installer depends on update-notifier-common (>= 0.119ubuntu2); however:
Package update-notifier-common is not configured yet.
dpkg: error processing package flashplugin-installer (--configure):
dependency problems - leaving unconfigured
Setting up linux-image-4.13.0-41-generic (4.13.0-41.46~16.04.1) ...
No apport report written because the error message indicates its a followup error from a previous failure.
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.13.0-41-generic /boot/vmlinuz-4.13.0-41-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.13.0-41-generic /boot/vmlinuz-4.13.0-41-generic
update-initramfs: Generating /boot/initrd.img-4.13.0-41-generic
run-parts: executing /etc/kernel/postinst.d/pm-utils 4.13.0-41-generic /boot/vmlinuz-4.13.0-41-generic
run-parts: executing /etc/kernel/postinst.d/unattended-upgrades 4.13.0-41-generic /boot/vmlinuz-4.13.0-41-generic
run-parts: executing /etc/kernel/postinst.d/update-notifier 4.13.0-41-generic /boot/vmlinuz-4.13.0-41-generic
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 4.13.0-41-generic /boot/vmlinuz-4.13.0-41-generic
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.13.0-41-generic
Found initrd image: /boot/initrd.img-4.13.0-41-generic
Found linux image: /boot/vmlinuz-4.13.0-39-generic
Found initrd image: /boot/initrd.img-4.13.0-39-generic
Found linux image: /boot/vmlinuz-4.13.0-38-generic
Found initrd image: /boot/initrd.img-4.13.0-38-generic
Found memtest86+ image: /boot/memtest86+.elf
Found memtest86+ image: /boot/memtest86+.bin
Found Windows 7 (loader) on /dev/sda1
done
Setting up linux-image-extra-4.13.0-41-generic (4.13.0-41.46~16.04.1) ...
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.13.0-41-generic /boot/vmlinuz-4.13.0-41-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.13.0-41-generic /boot/vmlinuz-4.13.0-41-generic
update-initramfs: Generating /boot/initrd.img-4.13.0-41-generic
run-parts: executing /etc/kernel/postinst.d/pm-utils 4.13.0-41-generic /boot/vmlinuz-4.13.0-41-generic
run-parts: executing /etc/kernel/postinst.d/unattended-upgrades 4.13.0-41-generic /boot/vmlinuz-4.13.0-41-generic
run-parts: executing /etc/kernel/postinst.d/update-notifier 4.13.0-41-generic /boot/vmlinuz-4.13.0-41-generic
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 4.13.0-41-generic /boot/vmlinuz-4.13.0-41-generic
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.13.0-41-generic
Found initrd image: /boot/initrd.img-4.13.0-41-generic
Found linux image: /boot/vmlinuz-4.13.0-39-generic
Found initrd image: /boot/initrd.img-4.13.0-39-generic
Found linux image: /boot/vmlinuz-4.13.0-38-generic
Found initrd image: /boot/initrd.img-4.13.0-38-generic
Found memtest86+ image: /boot/memtest86+.elf
Found memtest86+ image: /boot/memtest86+.bin
Found Windows 7 (loader) on /dev/sda1
done
Setting up linux-image-generic-hwe-16.04 (4.13.0.41.60) ...
Setting up linux-headers-4.13.0-41 (4.13.0-41.46~16.04.1) ...
Setting up linux-headers-4.13.0-41-generic (4.13.0-41.46~16.04.1) ...
Setting up linux-headers-generic-hwe-16.04 (4.13.0.41.60) ...
Setting up linux-generic-hwe-16.04 (4.13.0.41.60) ...
Setting up linux-libc-dev:amd64 (4.4.0-124.148) ...
Setting up qpdf (8.0.2-3~16.04.1) ...
Setting up sbt (1.1.5) ...
dpkg: error processing package software-properties-gtk (--configure):
package is in a very bad inconsistent state; you should
reinstall it before attempting configuration
Processing triggers for cups (2.1.3-4ubuntu0.4) ...
Processing triggers for libc-bin (2.23-0ubuntu10) ...
Errors were encountered while processing:
update-notifier-common
flashplugin-installer
software-properties-gtk
E: Sub-process /usr/bin/dpkg returned an error code (1)
答案1
请尝试以下操作:
sudo apt install --fix-missing --fix-broken
sudo apt update && sudo apt dist-upgrade
sudo apt install --reinstall software-properties-gtk \
python-apt python3-apt python-debian python3-debian