![尝试安装 OpenJDK Java Runtime 8 时无法解析软件包依赖项](https://linux22.com/image/883118/%E5%B0%9D%E8%AF%95%E5%AE%89%E8%A3%85%20OpenJDK%20Java%20Runtime%208%20%E6%97%B6%E6%97%A0%E6%B3%95%E8%A7%A3%E6%9E%90%E8%BD%AF%E4%BB%B6%E5%8C%85%E4%BE%9D%E8%B5%96%E9%A1%B9.png)
我正在尝试安装 OpenJDK Java 运行时 8,每当我尝试安装时,它都会显示一条错误消息,Package dependencies cannot be resolved
详细信息中显示
The following packages have unmet dependencies:
openjdk-8-jre: Depends: openjdk-8-jre-headless (= 8u91-b14-0ubuntu4~15.10.1) but 8u91-b14-0ubuntu4~15.10.1 is to be installed
Depends: libatk-wrapper-java-jni (>= 0.30.4-0ubuntu2) but it is not going to be installed
Depends: libgif4 (>= 4.1.4) but it is not going to be installed
我怎样才能安装它?
答案1
您可以通过执行以下操作来修复损坏的依赖关系:sudo apt-get install --fix-broken
-f, --fix-broken
Fix; attempt to correct a system with broken dependencies in place.
This option, when used with install/remove, can omit any packages
to permit APT to deduce a likely solution. If packages are
specified, these have to completely correct the problem.
更多详情请参阅man apt-get