0

Problemas na Instalação do Java - Linux Ubuntu 20.04 LTS

Ewerton Santos
Ewerton Santos

Seguindo o passo a passo da aula de "Desenvolvimento básico em Java", para instalação do java no Linux, surge os logs abaixo:


sudo add-apt-repository ppa:linuxuprising/java

 Oracle Java 11 (LTS) and 16 installer for Ubuntu (21.04, 20.10, 20.04, 18.04, 16.04 and 14.04), Pop!_OS, Linux Mint and Debian.


Java binaries are not hosted in this PPA due to licensing. The packages in this PPA download and install Oracle Java, so a working Internet connection is required.


The packages in this PPA are based on the WebUpd8 Oracle Java PPA packages: https://launchpad.net/~webupd8team/+archive/ubuntu/java


Created for users of https://www.linuxuprising.com/


Installation instructions (with some tips), feedback, suggestions, bug reports etc.:


Oracle Java 11: https://www.linuxuprising.com/2019/06/new-oracle-java-11-installer-for-ubuntu.html

Oracle Java 16: https://www.linuxuprising.com/2021/03/how-to-install-oracle-java-16-on-debian.html


Important notice regarding Oracle Java 11 and newer: the Oracle JDK license has changed starting April 16, 2019. The new license permits certain uses, such as personal use and development use, at no cost -- but other uses authorized under prior Oracle JDK licenses may no longer be available. A FAQ is available here: https://www.oracle.com/technetwork/java/javase/overview/oracle-jdk-faqs.html . After this change, new Oracle Java 11 releases (11.0.3 and newer) require signing in using an Oracle account to download the binaries. This PPA has a new installer that requires the user to download the Oracle JDK 11 .tar.gz and place it in a folder, and only then install the "oracle-java11-installer-local" package. Details here: https://www.linuxuprising.com/2019/06/new-oracle-java-11-installer-for-ubuntu.html


About Oracle Java 10, 12, 13, 14 and 15: These versions have reached the end of public updates, therefore they are longer available for download. The Oracle Java 10/12/13/14/15 packages in this PPA no longer worked due to this, so I have removed them. Switch to Oracle Java 11 or OpenJDK 11 instead, which is long term support, or the latest Oracle Java 16.

 More info: https://launchpad.net/~linuxuprising/+archive/ubuntu/java

Press [ENTER] to continue or Ctrl-c to cancel adding it.


Hit:1 http://br.archive.ubuntu.com/ubuntu focal InRelease

Get:2 http://br.archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]   

Get:3 http://security.ubuntu.com/ubuntu focal-security InRelease [109 kB]    

Hit:4 http://ppa.launchpad.net/linuxuprising/java/ubuntu focal InRelease    

Get:5 http://br.archive.ubuntu.com/ubuntu focal-backports InRelease [101 kB]  

Fetched 324 kB in 1s (231 kB/s)                   

Reading package lists... Done


*Ao executar o outro comando, eis que surge o problema


ewerton@ewerton-VirtualBox:~$ sudo apt install oracle-java10-installer

Reading package lists... Done

Building dependency tree    

Reading state information... Done

Package oracle-java10-installer is not available, but is referred to by another package.

This may mean that the package is missing, has been obsoleted, or

is only available from another source




Agradeço se alguém puder ajudar.




0
0

Comentários (7)

0
Ricard Roberg

Ricard Roberg

14/08/2021 20:06

Cria uma conta na Oracle e baixa o jdk 11

https://www.oracle.com/br/java/technologies/javase-jdk11-downloads.html

0
Neilor Marangoni

Neilor Marangoni

14/05/2021 22:34

Boa noite, me deparei com o mesmo erro, estou usando Ubuntu 20.04 LTS no Win10. A solução foi de outra forma, conforme segue:

sudo add-apt-repository ppa:openjdk-r/ppa

sudo apt-get update

sudo apt install openjdk-11-jdk

java -version


Abraço!

1
Ewerton Santos

Ewerton Santos

09/05/2021 10:17

Obrigado a todos. Instalei a versão 11

1
R

Rafael Barros

08/05/2021 16:19

creio que aí o ideal seria desintalar a versão instalada e os pacotes também, e aí reiniciar a instalação do zero.

1
Ali Iddar

Ali Iddar

08/05/2021 16:37

Tenta baixar e instalar o Amazon corretto 11

https://docs.aws.amazon.com/corretto/latest/corretto-11-ug/downloads-list.html

1
Anderson Almeida

Anderson Almeida

08/05/2021 17:14

Você está tentando instalar uma versão obsoleta do java, nesta ppa tem duas versões: a 11(lts) e a 16(a mais nova). Eu sugiro instalar a 11. Fazendo o seguinte:

sudo apt install oracle-java11-installer-local

2
William Dias

William Dias

09/05/2021 00:18

Boa noite Ewerton! Tenho um artigo que explica como instalar diferentes versões do java. Também teve colegas que contribuíram com suas experiências


https://web.digitalinnovation.one/articles/instalacao-do-oracle-jdk-para-linux?back=/articles


Caso auxilie, aponte que a resposta foi útil ao clicar para seta para cima ao lado do comentário.


Bons estudos!

None

Brasil