我在 Docker 上运行 Ubuntu 16.04 容器。
我执行容器并运行:
apt install apt-show-versions
我回复说:
Setting up apt-show-versions (0.22.3) ...
** initializing cache. This may take a while **
Error: No information about packages! (Maybe no deb entries?)
dpkg: error processing package apt-show-versions (--configure):
subprocess installed post-installation script returned error exit status 255
Errors were encountered while processing:
apt-show-versions
E: Sub-process /usr/bin/dpkg returned an error code (1)
我在运行 16.04 的主机上安装此包没有任何问题。
有谁知道可能导致该问题的原因是什么?
答案1
问题和解决方案解释如下:https://groups.google.com/forum/#!topic/beagleboard/jXb9KhoMOsk
rm /etc/apt/apt.conf.d/docker-gzip-indexes
apt-get purge apt-show-versions
rm /var/lib/apt/lists/*lz4
apt-get -o Acquire::GzipIndexes=false update
[…]
apt-get install apt-show-versions
The following NEW packages will be installed:
apt-show-versions
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 29.6 kB of archives.
After this operation, 163 kB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu xenial/universe amd64 apt-show-versions all 0.22.7 [29.6 kB]
Fetched 29.6 kB in 0s (371 kB/s)
Selecting previously unselected package apt-show-versions.
(Reading database ... 46320 files and directories currently installed.)
Preparing to unpack .../apt-show-versions_0.22.7_all.deb ...
Unpacking apt-show-versions (0.22.7) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up apt-show-versions (0.22.7) ...
** initializing cache. This may take a while **
root@4127ac89e58f:/#