Ubuntu无论安装什么包或者依赖都报这个错误:You might want to run 'apt-get -f install' to correct these:

转载至

https://blog.csdn.net/heray1990/article/details/47803541

 

 

解决方案为:按顺序执行一下命令即可

$ 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

$sudo apt-get upgrade

你可能感兴趣的:(linux)