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

Java 无法在Ubuntu 14上安装openjdk-7-jdk,java,linux,ubuntu-14.04,openjdk,Java,Linux,Ubuntu 14.04,Openjdk,我目前正在使用Ubuntu14作为我的操作系统。我想在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:

我目前正在使用Ubuntu14作为我的操作系统。我想在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安装openjdk-7-jdk
,但没有成功


请帮帮我。谢谢。

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

sudo apt get-f安装

它将安装所有断开的依赖项,然后运行命令

sudo apt get安装openjdk-7-jdk


它会起作用的,聪明的!