apt-get 安装没有自动依赖

  • Post author:
  • Post category:其他


问题:

apt-get install 不能自动安装依赖,安装新的包时,提示Unmet dependencies问题。

$ sudo apt-get install subversion
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
 subversion : Depends: libsvn1 (= 1.9.3-2ubuntu1.1) but it is not going to be installed
              Depends: libapr1 (>= 1.5.0) but it is not going to be installed
              Depends: libaprutil1 (>= 1.3.2+dfsg) but it is not going to be installed
...
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

原因:

某一个.deb包安装是没有完全安装,或者 apt-get upgrde 时中断

解决:

执行修复命令,并重新执行更新和升级,确保完整修复问题。

$ sudo apt --fix-broken install
$ sudo apt-get update
$ sudo apt-get upgrade