Debian

Debian buster arm64 apt 返回錯誤消息,軟體包安裝仍然有效

  • November 6, 2020

我在 arm64 硬體上執行 debian linux,剛剛進行了從拉伸到破壞的 dist 升級,一切似乎都在工作,除了我係統地收到以下消息:

Error connecting: Could not connect: Connection refused

在每個 apt 命令之後。

例如 apt update 將返回:

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.

值得注意的是,即使繼續出現相同的消息,軟體包也會成功安裝,例如,安裝 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

該錯誤來自系統的一個apt鉤子,它對系統的整體功能不是必不可少的。您將在以下文件中找到詳細資訊/etc/apt/apt.conf.d;我懷疑你的罪魁禍首可能是 PackageKit ( /etc/apt/apt.conf.d/20packagekit)。

如果您想確定哪個文件失敗,請依次重命名每個文件,添加.disabled其名稱,然後apt update再次執行。之後重命名每個文件,直到找到失敗的鉤子。

引用自:https://unix.stackexchange.com/questions/618308