Loading... dpkg: warning: files list file for package `*****` <!--more--> 上次按网上的教程修复树莓派一个软件包依赖后,限制安装软件总是会出现这个提示,假设被没有被安装。 查阅Google、CDSN后得到可以通过完整安装所有软件包解决问题。 **不过首先最好临时禁用 IPv6,否则有可能找不到某个包的 ipv6 地址。** ``` sudo sysctl -w net.ipv6.conf.all.disable_ipv6=1 sudo sysctl -w net.ipv6.conf.default.disable_ipv6=1 sudo sysctl -w net.ipv6.conf.lo.disable_ipv6=1 ``` 重启后会自动恢复配置。 新建repair.sh: ``` #!/bin/bash set -e # Clean out /var/cache/apt/archives apt-get clean # Fill it with all the .debs we need apt-get --reinstall -dy install $(dpkg --get-selections | grep '[[:space:]]install' | cut -f1) DIR=$(mktemp -d -t info-XXXXXX) for deb in /var/cache/apt/archives/*.deb do # Move to working directory cd "$DIR" # Create DEBIAN directory mkdir -p DEBIAN # Extract control files dpkg-deb -e "$deb" # Extract file list, fixing up the leading ./ and turning / into /. dpkg-deb -c "$deb" | awk '{print $NF}' | cut -c2- | sed -e 's/^\/$/\/./' > DEBIAN/list # Figure out binary package name DEB=$(basename "$deb" | cut -d_ -f1) # Copy each control file into place cd DEBIAN for file in * do cp -a "$file" /var/lib/dpkg/info/"$DEB"."$file" done # Clean up cd .. rm -rf DEBIAN done rmdir "$DIR" ``` 增加权限并运行: ``` sudo chmod u+x repair.sh sudo ./repair.sh ``` ![修复界面][1] **修复的过程中没有提示,请耐心等待!** >版权声明:部分转载于CSDN博主「oadaaa」的原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接及本声明。 >原文链接:https://blog.csdn.net/p942005405/article/details/86567416 [1]: https://blog.uniartisan.com/usr/uploads/2020/02/3767096601.png Last modification:February 27, 2020 © Allow specification reprint Support Appreciate the author AliPayWeChat Like If you think my article is useful to you, please feel free to appreciate