Problema com Java ao tentar atualizar pacotes [closed]

2

Estou recebendo estes erros ao tentar atualizar os pacotes:

sudo apt upgrade awesome
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... awesome is already the newest version.
The following packages were automatically installed and are no longer required:
  ant ant-optional antlr3 aspectj default-jdk-doc javahelp2 junit junit-doc junit4 junit4-doc libantlr-java
  libantlr3-runtime-java libasm3-java libaspectj-java libatinject-jsr330-api-java libbeansbinding-java libbindex-java
  libbsh-java libbytelist-java libcdi-api-java libcglib-java libcommons-beanutils-java libcommons-codec-java
  libcommons-collections3-java libcommons-compress-java libcommons-digester-java libcommons-httpclient-java
  libcommons-io-java libcommons-lang-java libcommons-net-java libcommons-net1-java libeclipselink-java
  libequinox-osgi-java libfelix-framework-java libfelix-main-java libfreemarker-java
  libgeronimo-interceptor-3.0-spec-java libgeronimo-j2ee-connector-1.5-spec-java libgeronimo-jms-1.1-spec-java
  libgeronimo-jpa-2.0-spec-java libgeronimo-jta-1.1-spec-java libgeronimo-osgi-support-java
  libgeronimo-validation-1.0-spec-java libhamcrest-java libhamcrest-java-doc libicu4j-4.4-java libini4j-java
  libjavaewah-java libjcodings-java libjcommander-java libjemmy2-java libjgit-java libjna-java libjna-jni
  libjna-platform-java libjnlp-servlet-java libjoda-convert-java libjoda-time-java libjpa-2.1-spec-java
  libjsch-agent-proxy-java libjsch-java libjson-simple-java libjsr311-api-java libjvyamlb-java libjzlib-java
  liblucene3-contrib-java liblucene3-java libmail-java libnb-absolutelayout-java libnb-apisupport3-java libnb-ide14-java
  libnb-java5-java libnb-javaparser-java libnb-org-openide-modules-java libnb-org-openide-util-java
  libnb-org-openide-util-lookup-java libnb-platform-devel-java libnb-platform18-java libntdb1 liboro-java
  libosgi-annotation-java libosgi-compendium-java libosgi-core-java libosgi-foundation-ee-java libregexp-java
  libsdo-api-java libsequence-library-java libserf-1-1 libservlet2.5-java libservlet3.1-java libsimple-validation-java
  libsqljet-java libstringtemplate-java libstringtemplate4-java libsvn-java libsvn1 libsvnclientadapter-java
  libsvnkit-java libswing-layout-java libswingx-java libtrilead-ssh2-java libws-commons-util-java libxerces2-java
  libxml-commons-external-java libxml-commons-resolver1.1-java libyaml-snake-java linux-headers-4.2.0-16
  linux-headers-4.2.0-16-generic linux-image-4.2.0-16-generic linux-image-extra-4.2.0-16-generic openjdk-7-doc
  python-ntdb testng
Use 'apt-get autoremove' to remove them.
Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] 
Setting up oracle-java8-installer (8u111+8u111arm-1~webupd8~0) ...
No /var/cache/oracle-jdk8-installer/wgetrc file found.
Creating /var/cache/oracle-jdk8-installer/wgetrc and
using default oracle-java8-installer wgetrc settings for it.
Downloading Oracle Java 8...
--2017-06-01 18:37:26--  http://download.oracle.com/otn-pub/java/jdk/8u111-b14/jdk-8u111-linux-x64.tar.gz
Resolving download.oracle.com (download.oracle.com)... 72.247.210.9, 72.247.210.27
Connecting to download.oracle.com (download.oracle.com)|72.247.210.9|:80... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: https://edelivery.oracle.com/otn-pub/java/jdk/8u111-b14/jdk-8u111-linux-x64.tar.gz [following]
--2017-06-01 18:37:26--  https://edelivery.oracle.com/otn-pub/java/jdk/8u111-b14/jdk-8u111-linux-x64.tar.gz
Resolving edelivery.oracle.com (edelivery.oracle.com)... 23.39.104.192, 2a02:26f0:15:1:8b00::2d3e, 2a02:26f0:15:1:9100::2d3e
Connecting to edelivery.oracle.com (edelivery.oracle.com)|23.39.104.192|:443... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: http://download.oracle.com/otn-pub/java/jdk/8u111-b14/jdk-8u111-linux-x64.tar.gz?AuthParam=1496335166_b886052f95ea6f92c97b905b0261ad04 [following]
--2017-06-01 18:37:26--  http://download.oracle.com/otn-pub/java/jdk/8u111-b14/jdk-8u111-linux-x64.tar.gz?AuthParam=1496335166_b886052f95ea6f92c97b905b0261ad04
Connecting to download.oracle.com (download.oracle.com)|72.247.210.9|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2017-06-01 18:37:28 ERROR 404: Not Found.

download failed
Oracle JDK 8 is NOT installed.
dpkg: error processing package oracle-java8-installer (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of oracle-java8-set-default:
 oracle-java8-set-default depends on oracle-java8-installer; however:
  Package oracle-java8-installer is not configured yet.

dpkg: error processing package oracle-java8-set-default (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
                                                                                                          Errors were encountered while processing:
 oracle-java8-installer
 oracle-java8-set-default
E: Sub-process /usr/bin/dpkg returned an error code (1)

Estou no Ubuntu 15.10.

    
por tirengarfio 01.06.2017 / 18:39

1 resposta

2

A parte mais relevante da saída é esta:

Downloading Oracle Java 8...
--2017-06-01 18:37:26--  http://download.oracle.com/otn-pub/java/jdk/8u111-b14/jdk-8u111-linux-x64.tar.gz
Resolving download.oracle.com (download.oracle.com)... 72.247.210.9, 72.247.210.27
Connecting to download.oracle.com (download.oracle.com)|72.247.210.9|:80... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: https://edelivery.oracle.com/otn-pub/java/jdk/8u111-b14/jdk-8u111-linux-x64.tar.gz [following]
--2017-06-01 18:37:26--  https://edelivery.oracle.com/otn-pub/java/jdk/8u111-b14/jdk-8u111-linux-x64.tar.gz
Resolving edelivery.oracle.com (edelivery.oracle.com)... 23.39.104.192, 2a02:26f0:15:1:8b00::2d3e, 2a02:26f0:15:1:9100::2d3e
Connecting to edelivery.oracle.com (edelivery.oracle.com)|23.39.104.192|:443... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: http://download.oracle.com/otn-pub/java/jdk/8u111-b14/jdk-8u111-linux-x64.tar.gz?AuthParam=1496335166_b886052f95ea6f92c97b905b0261ad04 [following]
--2017-06-01 18:37:26--  http://download.oracle.com/otn-pub/java/jdk/8u111-b14/jdk-8u111-linux-x64.tar.gz?AuthParam=1496335166_b886052f95ea6f92c97b905b0261ad04
Connecting to download.oracle.com (download.oracle.com)|72.247.210.9|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2017-06-01 18:37:28 ERROR 404: Not Found.

A instalação de oracle-java8-installer falha porque o download de http://download.oracle.com/otn-pub/java/jdk/8u111-b14/jdk-8u111-linux-x64.tar.gz?AuthParam=1496335166_b886052f95ea6f92c97b905b0261ad04 falha. É estranho que falhe repetidamente.

O que você pode tentar nesta situação é baixar o arquivo em outro computador e copiá-lo para este, para o caminho certo, e execute novamente apt-get install .

  1. Acesse o link e faça login ou crie uma conta se ainda não tiver uma
  2. Vá para os arquivos do JDK e encontre o Java SE Development Kit 8u111 : link
  3. Clique em Aceitar contrato de licença
  4. Clique em jdk-8u111-linux-x64.tar.gz para fazer o download
  5. Copie no outro computador para /var/cache/oracle-jdk8-installer/jdk-8u111-linux-x64.tar.gz
  6. Executar sudo apt-get install -f

Desta vez, o oracle-java8-installer deve encontrar o arquivo já existente e instalar a partir dele, em vez de tentar (e não conseguir) fazer o download.

    
por janos 03.07.2017 / 20:30