尝试安装 Java SDK 时出错

尝试安装 Java SDK 时出错

我需要安装 Java 6 SDK,但运行此命令后:

sudo apt-get install sun-java6-jdk sun-java6-jre sun-java6-source

我最终得到这个:

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:
sun-java6-jdk : Depends: sun-java6-bin (>= 6.26-1lucid1) but it is not going to be                   installed
sun-java6-jre : Depends: sun-java6-bin (>= 6.26-1lucid1) but it is not going to be  installed or
ia32-sun-java6-bin (>= 6.26-1lucid1) but it is not installable
Recommends: gsfonts-x11 but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

我对 Ubuntu 还不熟悉,需要这些软件包来完成我的课程。我猜它们已经损坏了,但是,我该如何修复它呢?

答案1

它说它没有依赖项 sun-java6-bin,因此也请安装它。将原始命令修改为:

sudo apt-get install sun-java6-jdk sun-java6-jre sun-java6-source sun-java6-bin

相关内容