web-dev-qa-db-fra.com

ne peut pas installer openjdk-7-jdk et openjdk-7-jre

Quand je cours

Sudo apt-get install openjdk-7-jdk

Je reçois cette erreur

$ Sudo apt-get install openjdk-7-jdk

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package openjdk-7-jdk is a virtual package provided by:
  Oracle-Java9-installer 9b123+9b123arm-1~webupd8~0
  Oracle-Java8-installer 8u92+8u91arm-2~really8u91~webupd8~0
  Oracle-Java7-installer 7u80+7u60arm-0~webupd8~1
You should explicitly select one to install.
E: Package 'openjdk-7-jdk' has no installation candidate


$ Sudo apt-get install Oracle-Java-7-installer

Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package Oracle-Java-7-installer


$ Sudo apt-get install openjdk-7-jdk

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package openjdk-7-jdk is a virtual package provided by:
  Oracle-Java9-installer 9b123+9b123arm-1~webupd8~0
  Oracle-Java8-installer 8u92+8u91arm-2~really8u91~webupd8~0
  Oracle-Java7-installer 7u80+7u60arm-0~webupd8~1
You should explicitly select one to install. 
E: Package 'openjdk-7-jdk' has no installation candidate


$ Sudo apt-get install Oracle-Java7-installer

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Oracle-Java7-installer is already the newest version (7u80+7u60arm-0~webupd8~1).
0 upgraded, 0 newly installed, 0 to remove and 79 not upgraded.


$ Sudo apt-get install openjdk-7-jdk

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package openjdk-7-jdk is a virtual package provided by:
  Oracle-Java9-installer 9b123+9b123arm-1~webupd8~0
  Oracle-Java8-installer 8u92+8u91arm-2~really8u91~webupd8~0
  Oracle-Java7-installer 7u80+7u60arm-0~webupd8~1
You should explicitly select one to install.
E: Package 'openjdk-7-jdk' has no installation candidate
1
Amit Kumar

J'ai eu le même problème mais je pouvais l'installer après avoir exécuté ces commandes:

Sudo apt-get install -f
Sudo add-apt-repository ppa:openjdk-r/ppa  
Sudo apt-get update
Sudo apt-get install openjdk-7-jre 
7

J'ai pu résoudre en utilisant les commandes suivantes,

%sh Sudo apt-get -y --allow-change-held-packages install openjdk-8-jdk
0
Naresh Kumar