因此,我的ubuntu安装(16.04.6LTS)在配置更新通知程序时遇到了问题:
~$ sudo dpkg --configure -a
Setting up update-notifier-common (3.168.10) ...
Traceback (most recent call last):
File "/usr/lib/update-notifier/package-data-downloader", line 24, in
import debian.deb822
File "/usr/lib/python3/dist-packages/debian/deb822.py", line 38, in
import chardet
ImportError: No module named 'chardet'
dpkg: error processing package update-notifier-common (--configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of update-notifier:
update-notifier depends on update-notifier-common (= 3.168.10); however:
Package update-notifier-common is not configured yet.
dpkg: error processing package update-notifier (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of ubuntu-desktop:
ubuntu-desktop depends on update-notifier; however:
Package update-notifier is not configured yet.
dpkg: error processing package ubuntu-desktop (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
update-notifier-common
update-notifier
ubuntu-desktop所以,看起来我需要chadet来完成这个配置工作。试图安装它告诉我它已经安装了:
$ sudo apt-get install python-chardet
Reading package lists... Done
Building dependency tree
Reading state information... Done
python-chardet is already the newest version (2.3.0-2).
0 upgraded, 0 newly installed, 0 to remove and 82 not upgraded.
3 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] n
Abort.不知道为什么python (v.2.7.12)找不到chardet,有什么想法吗?
表示它也是为Python 3安装的:
$ sudo apt install python3-chardet
Reading package lists... Done
Building dependency tree
Reading state information... Done
python3-chardet is already the newest version (2.3.0-2).
0 upgraded, 0 newly installed, 0 to remove and 82 not upgraded.
3 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] n
Abort.发布于 2019-06-05 10:32:59
好吧,发现问题了。经过一番周旋之后,我发现我有两个不同版本的python3 (3.5和3.6),/usr/bin中的python3符号链接指向了错误的一个(3.5)。删除链接,重新生成指向3.6 -现在事情工作:
$ sudo dpkg --configure -a
Setting up update-notifier-common (3.168.10) ...
Setting up update-notifier (3.168.10) ...
Setting up ubuntu-desktop (1.361.3) ...所以,从本质上说,这是我以前在我的系统上乱糟糟的。
https://askubuntu.com/questions/1148751
复制相似问题