尝试安装 OpenJDK Java Runtime 8 时无法解析软件包依赖项

尝试安装 OpenJDK Java Runtime 8 时无法解析软件包依赖项

我正在尝试安装 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

相关内容