大家好,我最近几天尝试安装termianl 的所有东西,Java 的 jdk,但没有成功。后来我尝试安装 WinUSB,一切正常。 今天恐慌,我准备安装 AWN,但我发现即使输入 sudo apt-get update 也会出现错误。我解决了这些错误,但每次我尝试安装任何应用程序时,终端都会出现这样的错误。下面是包含这些错误的完整代码,也许你们中有人遇到过这种情况,或者知道如何帮助我。 大问题是我无法安装任何其他东西,因为我总是遇到这个错误。非常感谢您的关注和帮助!
我写 sudo apt-get install oracle-java7-installer
我需要 Java 才能使用 Netbeans
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
oracle-java7-installer : Depends: java-common (>= 0.24) but it is not installable
Recommends: gsfonts-x11 but it is not installable
E: Unable to correct problems, you have held broken packages.
編輯
java-common:
Installed: (none)
Candidate: (none)
Version table:
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04.3 LTS
Release: 14.04
Codename: trusty
Linux giovanni-X551CAP 3.19.0-30-generic #34~14.04.1-Ubuntu SMP Fri Oct 2 22:09:39 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
答案1
无论出于何种原因,main
存储库丢失或您的软件包信息被删除或从未更新。执行以下命令:
sudo apt-add-repository main
sudo apt-get update
sudo apt-get install oracle-java7-installer
答案2
清除外部 ppa 并从存储库中安装 openjdk:
$ sudo apt install ppa-purge
$ ppa-purge [YOUR PPA]
$ sudo apt install openjdk-7-jre