I'm running a debian linux on arm64 hardware, just did a dist-upgrade from stretch to buster and everything seems to be working except I'm systematically getting the following message:

Error connecting: Could not connect: Connection refused

After every apt command.

For example apt update will return:

Get:1 http://deb.debian.org/debian buster InRelease [121 kB]
Get:2 http://deb.debian.org/debian buster/main arm64 Packages [7736 kB]
Get:3 http://deb.debian.org/debian buster/main Translation-en [5968 kB]
Get:4 http://deb.debian.org/debian buster/contrib arm64 Packages [38.7 kB]
Get:5 http://deb.debian.org/debian buster/contrib Translation-en [44.5 kB]
Fetched 13.9 MB in 5s (3012 kB/s)
Error connecting: Could not connect: Connection refused
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.

Its worth noting the packages do install successfully even though the same message continue to appear, for example, installating nmap:

root@localhost:/home/marc# apt install nmap
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  cgmanager default-mysql-server galera-3 libaio1 libass5 libavcodec57 libavdevice57 libavfilter6 libavformat57
  libavresample3 libavutil55 libbind9-140 libblas-common libbluray1 libboost-iostreams1.62.0 libcdio-cdda1
  libcdio-paranoia1 libcdio13 libcgmanager0 libconfig-inifiles-perl libdbd-mysql-perl libdbi-perl libdns162
  libdrm-freedreno1 libebur128-1 libevent-2.0-5 libfile-copy-recursive-perl libgcr-3-common libgfortran3
Get:2 http://deb.debian.org/debian buster/main arm64 liblua5.3-0 arm64 5.3.3-1.1 [110 kB]
Get:3 http://deb.debian.org/debian buster/main arm64 nmap-common all 7.70+dfsg1-6+deb10u1 [3898 kB]
Get:4 http://deb.debian.org/debian buster/main arm64 nmap arm64 7.70+dfsg1-6+deb10u1 [1844 kB]
Fetched 5889 kB in 1s (11.3 MB/s)
Retrieving bug reports... Done
Parsing Found/Fixed information... Done
Selecting previously unselected package liblinear3:arm64.
(Reading database ... 88667 files and directories currently installed.)
Preparing to unpack .../liblinear3_2.1.0+dfsg-4_arm64.deb ...
Unpacking liblinear3:arm64 (2.1.0+dfsg-4) ...
Selecting previously unselected package liblua5.3-0:arm64.
Preparing to unpack .../liblua5.3-0_5.3.3-1.1_arm64.deb ...
Unpacking liblua5.3-0:arm64 (5.3.3-1.1) ...
Selecting previously unselected package nmap-common.
Preparing to unpack .../nmap-common_7.70+dfsg1-6+deb10u1_all.deb ...
Unpacking nmap-common (7.70+dfsg1-6+deb10u1) ...
Selecting previously unselected package nmap.
Preparing to unpack .../nmap_7.70+dfsg1-6+deb10u1_arm64.deb ...
Unpacking nmap (7.70+dfsg1-6+deb10u1) ...
Setting up nmap-common (7.70+dfsg1-6+deb10u1) ...
Setting up liblinear3:arm64 (2.1.0+dfsg-4) ...
Setting up liblua5.3-0:arm64 (5.3.3-1.1) ...
Setting up nmap (7.70+dfsg1-6+deb10u1) ...
Processing triggers for man-db (2.8.5-2) ...
Processing triggers for libc-bin (2.28-10) ...
Error connecting: Could not connect: Connection refused

The error comes from one of your system’s apt hooks, which aren’t essential to the system’s overall functionality. You’ll find details in the files under /etc/apt/apt.conf.d; I suspect the culprit in your case could be PackageKit (/etc/apt/apt.conf.d/20packagekit).

If you want to figure out which one is failing, rename each file in turn, adding .disabled to its name, and run apt update again. Rename each file back afterwards, until you find the failing hook.

  • Wonderfull, it was indeed 20packagekit who messed everything up. What is the impact of disabling it ? Should I fix it or can my system work without it safely ? – Marc Nov 6 '20 at 9:34
  • 1
    The technical impact is that PackageKit won’t be aware of what apt is doing; the only user-visible impact of that is that, if you have a desktop environment running on your ARM64 system, and that environment relies on PackageKit for software upgrades, you won’t get notified about them. If you use apt for your package management it won’t make any material difference. – Stephen Kitt Nov 6 '20 at 9: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.