dpkg错误记录

1.dpkg: warning: files list file missing; assuming package has no files currently installed

解决办法:将错误信息放入reinstall.txt,然后运行下面脚本,重新安装这些包

#!/bin/bash
for package in $(cat reinstall.txt | grep "dpkg: warning: files list file for package " | grep -Po "'[^']*'" | sed "s/'//g");
do
  sudo apt-get install --reinstall "$package";
done

2.dpkg: error processing package*

这里看到的解决办法

sudo mv /var/lib/dpkg/info/ /var/lib/dpkg/info_old/
sudo mkdir /var/lib/dpkg/info/
sudo apt-get update
sudo apt-get -f install
sudo mv /var/lib/dpkg/info/* /var/lib/dpkg/info_old/
sudo rm -rf /var/lib/dpkg/info
sudo mv /var/lib/dpkg/info_old/ /var/lib/dpkg/info/

之后sudo apt-get update

你可能感兴趣的:(dpkg错误记录)