1

So my ubuntu installation (16.04.6 LTS) is having a problem configuring the update-notifier:

~$ 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 <module>
    import debian.deb822
  File "/usr/lib/python3/dist-packages/debian/deb822.py", line 38, in <module>
    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

So, it looks like I need chadet to have this configuration work. Attempting to install this tells me it is already installed:

$ 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.

Not sure why python (v.2.7.12) cannot find chardet, any ideas?

Says it is installed for Python 3 as well:

$ 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.
  • You need chardet for Python 3 here, not for 2. Try sudo apt install python3-chardet instead. – Byte Commander Jun 5 at 10:05
  • @ByteCommander - so it looks like I have that installed as well - so that doesn't seem to be the problem. Python path problem maybe? – FrankRalphBob Jun 5 at 10:23
1

OK, found the problem. After mucking around with it a bit, I found out that I have two different version of python3 (3.5 and 3.6) and python3 symbolic link in /usr/bin was pointing to the wrong one (3.5). Deleted the link, re-generated to point to 3.6 - now things work:

$ 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) ...

So, essentially my bad from previous mucking around with my system.

  • Right, that explains the issue. Nice that you could find it yourself. This is exactly one of the reasons why people should not remove or replace the system's preinstalled Python instances. – Byte Commander Jun 5 at 10:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.