I am repeatedly getting this message:

Setting up apt-listchanges (3.10) ...
Traceback (most recent call last):
  File "/tmp/tmp.aulCeycFHm.aptlc/debconf-helper.py", line 6, in <module>
    import debconf
ImportError: No module named 'debconf'
dpkg: error processing package apt-listchanges (--configure):
 subprocess installed post-installation script returned error exit status 1
Processing triggers for man-db ( ...
Errors were encountered while processing:


~$ dpkg --status debconf
Package: debconf
Status: install ok installed
Priority: required
Section: admin
Installed-Size: 558
Maintainer: Debconf Developers <debconf-devel@lists.alioth.debian.org>
Architecture: all
Multi-Arch: foreign
Version: 1.5.60
Replaces: debconf-tiny
Provides: debconf-2.0
Pre-Depends: perl-base (>= 5.6.1-4)
Recommends: apt-utils (>= 0.5.1), debconf-i18n
Suggests: debconf-doc, debconf-utils, whiptail | dialog, libterm-readline-gnu-perl, libgtk2-perl (>= 1:1.130), libnet-ldap-perl, perl, libqtgui4-perl, libqtcore4-perl
Conflicts: apt (<<, cdebconf (<< 0.96), debconf-tiny, debconf-utils (<< 1.3.22), dialog (<< 0.9b-20020814-1), menu (<= 2.1.3-1), whiptail (<< 0.51.4-11), whiptail-utf8 (<= 0.50.17-13)
 /etc/apt/apt.conf.d/70debconf 7e9d09d5801a42b4926b736b8eeabb73
 /etc/debconf.conf 8c0619be413824f1fc7698cee0f23811
Description: Debian configuration management system
 Debconf is a configuration management system for debian packages. Packages
 use Debconf to ask questions when they are installed.

ls -l /usr/lib/python*/dist-packages/debconf.py

ls -l /usr/lib/python*/dist-packages/debconf.py
  • Have you successfully used apt-listchanges before? Have you configured or reconfigured it? Look at jxf.me/entries/better-apt-ubuntu --- scroll down to: Using apt-listchanges
    – user8779
    May 18 '17 at 17:22
  • Please add the output of the dpkg --status debconf and ls -l /usr/lib/python*/dist-packages/debconf.py commands to your question. May 19 '17 at 9:58
  • Do you have 'debconf' & 'debconf-utils' installed?
    – SD Allen
    May 19 '17 at 14:10
  • I have added the printouts from those commands. I have debconf and I now have debconf-utils. May 22 '17 at 17:24

This may not be important to you anymore, but I figured out a workaround, at least for me.

The problem is that it can't find debconf.py on your path. In my case it was using a different python with different settings than what was normally on my path.

I eventually found a debconf.py file in /usr/lib/python3/dist-packages/debconf.py. For me, it was python3.6 that had the wrong path, which you can find by doing:

$ python3.6
>>> import sys
>>> sys.path

Which showed me that it didn't have what was on my $PATH. Rather than muck around too much, I just ran this:

# ln -s /usr/lib/python3/dist-packages/debconf.py /usr/local/lib/python3.6/site-packages

The destination can be anywhere that shows up in that sys.path. You could probably copy instead of symlink. Regardless, That's what I did and it worked for me - I hope you have similar luck!


I started getting this error when I upgraded my computation server from Debian jessie to Debian stretch.

My problem was that I had (foolishly) manually installed Python 3.5 system-wide before the upgrade to stretch, and that version of Python was 'masking' the default stretch Python 3 install. In particular, these factors were at play:

  • My manual v3.5 install had put its python3 symlink into /usr/local/bin

  • The Debian python3 system package had installed symlinks into /usr/bin

  • /usr/local/bin was earlier in my $PATH than was /usr/bin

So, to fix this specific problem, all I had to do was rename the /usr/local/bin/python3 symlink to, e.g., /usr/local/bin/python3-local, and then import debconf worked fine after a python3 invocation.

A more complete solution would probably be a total uninstall of the system-wide manual version of Python 3.5, and re-installing it sandboxed.

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.