无法在 Ubuntu 14 上安装 openjdk-7-jdk

Cannot install openjdk-7-jdk on Ubuntu 14

我目前使用 ubuntu 14 作为我的 OS。我想在 Ubuntu 上安装 openjdk-7-jdk 但是当我输入 sudo apt-get install openjdk-7-jdk 时出现错误。这是错误消息:

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:
  google-chrome-stable : Depends: libappindicator1 but it is not going to be installed
  openjdk-7-jdk : Depends: openjdk-7-jre (= 7u79-2.5.6-0ubuntu1.14.04.1) but it is not going to be installed
                  Recommends: libxt-dev but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

我试过 sudo apt-get -f install openjdk-7-jdk 但没用。

请帮助我。谢谢。

在安装 openjdk 之前,您有一些损坏的软件包。 运行 命令

sudo apt-get -f install

它将安装所有损坏的依赖项然后 运行 命令

sudo apt-get install openjdk-7-jdk

它会起作用