[Solved] Dynamic DNS client installation fails with debconf or dpkg error (2)


The installation of the Dynamic DNS client fails. Please have a look below and let me know how to fix it. Thanks!

I can’t SSH into the Freedombox because I get an error about a changed host key. I’m not very knowledgeable about the terminal (using MacOS).

Problem Description
Dynamic DNS client installation fails with debconf or dpkg error (2)

Steps to Reproduce

  1. new system from latest image (2019-04-28) freedombox-testing-free_latest_a20-olinuxino-micro-armhf.img
  2. Dynamic DNS - install
  3. install fails with error

Error installing application: Error during installation E: Sub-process /usr/bin/dpkg returned an error code (2)

Trying to do a manual update shows this in the update-logs

2019-05-08 21:52:51,959 INFO Checking if system is running on battery is skipped. Please install powermgmt-base package to check power status and skip installing updates when the system is running on battery.
2019-05-08 21:52:51,999 INFO Initial blacklist :
2019-05-08 21:52:52,003 INFO Initial whitelist:
2019-05-08 21:52:52,005 INFO Starting unattended upgrades script
2019-05-08 21:52:52,007 INFO Allowed origins are: origin=Debian,codename=buster,label=Debian, origin=Debian,codename=buster,label=Debian-Security, o=Debian Backports,a=buster-backports,l=Debian Backports
2019-05-08 21:54:26,396 INFO Packages that will be upgraded: apt apt-utils bind9-host cpio debian-archive-keyring distro-info-data dnsutils haveged libapt-inst2.0 libapt-pkg5.0 libaudit-common libaudit1 libbind9-161 libc-bin libc-dev-bin libc-l10n libc6 libc6-dev libcryptsetup12 libdns-export1104 libdns1104 libhavege1 libirs161 libisc-export1100 libisc1100 libisccc161 libisccfg163 liblwres161 librsvg2-2 librsvg2-common locales locales-all nscd tar vim-common vim-tiny wpasupplicant xxd
2019-05-08 21:54:26,399 INFO Writing dpkg log to /var/log/unattended-upgrades/unattended-upgrades-dpkg.log
2019-05-08 21:54:36,231 ERROR Exception happened during upgrade.
Traceback (most recent call last):
File “/usr/bin/unattended-upgrades”, line 610, in cache_commit
res = cache.commit(install_progress=iprogress)
File “/usr/lib/python3/dist-packages/apt/cache.py”, line 648, in commit
raise SystemError(“installArchives() failed”)
SystemError: installArchives() failed
2019-05-08 21:54:37,802 ERROR Exception happened during upgrade.
NoneType: None
2019-05-08 21:54:37,806 ERROR Installing the upgrades failed!
2019-05-08 21:54:37,808 ERROR error message: installArchives() failed
2019-05-08 21:54:37,811 ERROR dpkg returned a error! See /var/log/unattended-upgrades/unattended-upgrades-dpkg.log for details



  • *FreedomBox version 19.1
  • Hardware: A20 OLinuXino MICRO
  • How did you install FreedomBox?: downloading testing images from https://freedombox.org

It seems that the package management system went into a really bad shape. Perhaps this is due to SD card hardware errors. Or it could be power reset during a critical package installation/upgrade operation (unlikely).

I believe this has nothing to do with your hardware or with Dynamic DNS. All package installation or upgrade operations will fail unless this is fixed.

Some people have discussed solutions here. However, I would suggest re-flashing the image (after data backup) on a different SD card if possible.

To login to SSH, you can remove the offending host key. You have likely connected to different machine is the same IP address earlier on this machine. If you get a message such as this, then try running the command:

 ssh-keygen -R <ip_address>

After that login normally.

1 Like

Thanks so much Sunil!

Before I posted, I already tried two MicroSD cards, as well as two MicroSD readers/writers but always ended up with inconsistent issues. Now I used a new MicroSD card, flashed with the 2019-04-28 testing image, and things are looking bright! I did get an error message about unmet depencencies while installing Dynamic DNS, but thanks to your other tip about removing the saved host key I managed to resolve that.

Thanks for your help!