não consigo instalar openjdk-7-jdk e openjdk-7-jre

1

Quando eu corro

sudo apt-get install openjdk-7-jdk

Estou recebendo este erro

$ 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
    
por Amit Kumar 08.07.2016 / 11:55

2 respostas

5

Eu tive o mesmo problema, mas consegui instalá-lo depois de executar esses comandos:

sudo apt-get install -f
sudo add-apt-repository ppa:openjdk-r/ppa  
sudo apt-get update
sudo apt-get install openjdk-7-jre 
    
por Mahmoud Mohammed Afify 13.11.2016 / 17:53
0

Consegui resolver usando os seguintes comandos,

%sh sudo apt-get -y --allow-change-held-packages install openjdk-8-jdk
    
por Naresh Kumar 04.09.2018 / 12:05