无法使用 apt 安装任何软件:“‘install-info’包含空文件名”

无法使用 apt 安装任何软件:“‘install-info’包含空文件名”

我已经搜索过,但找不到任何特定于我的案例的内容。我正在运行 Kali 2021.4,但我在执行任何操作时都遇到问题apt。有人告诉我应该跑步apt --fix-broken install,我就这么做了,然后我得到:

The following additional packages will be installed:
  libpython3.9 libpython3.9-dev libpython3.9-minimal libpython3.9-stdlib python3.9 python3.9-dev python3.9-minimal
Suggested packages:
  python3.9-venv python3.9-doc
The following packages will be upgraded:
  libpython3.9 libpython3.9-dev libpython3.9-minimal libpython3.9-stdlib python3.9 python3.9-dev python3.9-minimal
7 upgraded, 0 newly installed, 0 to remove and 2199 not upgraded.
4 not fully installed or removed.
Need to get 0 B/11.3 MB of archives.
After this operation, 73.7 kB disk space will be freed.
Do you want to continue? [Y/n] y
Reading changelogs... Done
dpkg: unrecoverable fatal error, aborting:
 files list file for package 'install-info' contains empty filename
E: Sub-process /usr/bin/dpkg returned an error code (2) "

我已经尝试了很多事情,坦率地说,目前还不清楚我对我的系统做了什么。现在正在备份文件,但是任何可以使我免于重新安装的帮助将不胜感激。

答案1

您需要清理/var/lib/dpkg/info/install-info.list,然后为了安全起见,重新安装install-info

sudo sed -i '/^$/d' /var/lib/dpkg/info/install-info.list
sudo apt reinstall install-info

完成后,其他apt操作应该可以正常进行。

相关内容