J'essaie d'installer sbt sur Ubuntu 16.04. J'ai arrêté par erreur le processus lors de l'exécution de la commande suivante,
Sudo apt-get install sbt
Maintenant, lorsque j'essaye de réinstaller, je reçois l'erreur ci-dessous,
Downloading Oracle Java 8...
--2017-04-24 17:34:33-- http://download.Oracle.com/otn-pub/Java/jdk/8u131-b11/d54c1d3a095b4ff2b6607d096fa80163/jdk-8u131-linux-x64.tar.gz
Resolving download.Oracle.com (download.Oracle.com)... 104.80.89.58, 104.80.89.16
Connecting to download.Oracle.com (download.Oracle.com)|104.80.89.58|:80... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: https://edelivery.Oracle.com/otn-pub/Java/jdk/8u131-b11/d54c1d3a095b4ff2b6607d096fa80163/jdk-8u131-linux-x64.tar.gz [following]
--2017-04-24 17:34:35-- https://edelivery.Oracle.com/otn-pub/Java/jdk/8u131-b11/d54c1d3a095b4ff2b6607d096fa80163/jdk-8u131-linux-x64.tar.gz
Resolving edelivery.Oracle.com (edelivery.Oracle.com)... 23.200.209.153, 2600:1409:a:183::2d3e, 2600:1409:a:193::2d3e
Connecting to edelivery.Oracle.com (edelivery.Oracle.com)|23.200.209.153|:443... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: http://download.Oracle.com/otn-pub/Java/jdk/8u131-b11/d54c1d3a095b4ff2b6607d096fa80163/jdk-8u131-linux-x64.tar.gz?AuthParam=1493035597_d0396e6a99df9ccfeb3f6d895673df09 [following]
--2017-04-24 17:34:37-- http://download.Oracle.com/otn-pub/Java/jdk/8u131-b11/d54c1d3a095b4ff2b6607d096fa80163/jdk-8u131-linux-x64.tar.gz?AuthParam=1493035597_d0396e6a99df9ccfeb3f6d895673df09
Connecting to download.Oracle.com (download.Oracle.com)|104.80.89.58|:80... connected.
HTTP request sent, awaiting response... 416 Requested Range Not Satisfiable
The file is already fully retrieved; nothing to do.
Download done.
Removing outdated cached downloads...
sha256sum mismatch jdk-8u131-linux-x64.tar.gz
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 sbt:
sbt depends on openjdk-8-jdk; however:
Package openjdk-8-jdk is not installed.
Package Oracle-Java8-installer which provides openjdk-8-jdk is not configured yet.
dpkg: error processing package sbt (--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
sbt
E: Sub-process /usr/bin/dpkg returned an error code (1)
Comment résoudre ce problème?
Mise à jour 1:
J'ai essayé cette solution . Mais cela ne m'a toujours pas aidé à résoudre ce problème et à obtenir la même erreur ci-dessous?
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up Oracle-Java8-installer (8u131-1~webupd8~2) ...
Installing from local file /var/cache/Oracle-jdk8-installer/jdk-8u131-linux-x64.tar.gz
Removing outdated cached downloads...
install: cannot stat 'javaws-wrapper.sh': No such file or directory
dpkg: error processing package Oracle-Java8-installer (--configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of sbt:
sbt depends on openjdk-8-jdk; however:
Package openjdk-8-jdk is not installed.
Package Oracle-Java8-installer which provides openjdk-8-jdk is not configured yet.
dpkg: error processing package sbt (--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
sbt
E: Sub-process /usr/bin/dpkg returned an error code (1)
il y a si longtemps que vous avez demandé. En l'absence de réponse ici, je vous montre ma solution qui fonctionne bien pour moi.
La cause première de votre problème provient peut-être d'une précédente installation de Java (ce n'est pas d'un référentiel, mais d'un package téléchargé manuellement) . Ainsi, vous devez supprimer manuellement les scripts de post-installation.
Sudo rm /var/lib/dpkg/info/Oracle-Java8-installer.postinst -f
Sudo dpkg --configure Oracle-Java8-installer
J'espère qu'ils vous aideront.
!! REMARQUE !!Cette solution risque de ne pas fonctionner si Oracle cesse de servir des fichiers à partir de son service FTP . Pour les versions plus anciennes de Java.
Lorsque ppa:webupd8team/Java
est utilisé, des liens Oracle obsolètes/archivés peuvent être codés en dur dans PPA . Oracle transfère leurs versions antérieures vers des archives et PPA dispose de liens internes vers les versions de téléchargement Oracle "actives" (au moment de la création de PPA).
Le mainteneur de ppa:webupd8team/Java
est un seul homme - Andrew (voir ici )
Problème
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
Errors were encountered while processing:
Oracle-Java8-installer
E: Sub-process /usr/bin/dpkg returned an error code (1)
Solution
cd /var/lib/dpkg/info
Sudo sed -i 's|Java_VERSION=8u151|Java_VERSION=8u162|' Oracle-Java8-installer.*
Sudo sed -i 's|PARTNER_URL=http://download.Oracle.com/otn-pub/Java/jdk/8u151-b12/e758a0de34e24606bca991d704f6dcbf/|PARTNER_URL=http://download.Oracle.com/otn-pub/Java/jdk/8u162-b12/0da788060d494f5095bf8624735fa2f1/|' Oracle-Java8-installer.*
Sudo sed -i 's|SHA256SUM_TGZ="c78200ce409367b296ec39be4427f020e2c585470c4eed01021feada576f027f"|SHA256SUM_TGZ="68ec82d47fd9c2b8eb84225b6db398a72008285fafc98631b1ff8d2229680257"|' Oracle-Java8-installer.*
Sudo sed -i 's|J_DIR=jdk1.8.0_151|J_DIR=jdk1.8.0_162|' Oracle-Java8-installer.*
Les versions de Java changent "souvent", alors mettez à jour
8u151
et8u162
afin de refléter votre environnement. (Cette version fonctionnait sous Ubuntu 16.04.3 LTS - 2018-01-18)
Réessayer
apt install Oracle-Java8-installer
apt install Oracle-Java8-set-default
En savoir plus sur le problème
Solution avec 16.0.4:
cd /var/lib/dpkg/info
Sudo sed -i 's|Java_VERSION=8u181|Java_VERSION=8u191|' Oracle-Java8-installer.*
Sudo sed -i 's|PARTNER_URL=http://download.Oracle.com/otn-pub/Java/jdk/8u181-b13/96a7b8442fe848ef90c96a2fad6ed6d1/|PARTNER_URL=http://download.Oracle.com/otn-pub/Java/jdk/8u191-b12/2787e4a523244c269598db4e85c51e0c/|' Oracle-Java8-installer.*
Sudo sed -i 's|SHA256SUM_TGZ="1845567095bfbfebd42ed0d09397939796d05456290fb20a83c476ba09f991d3"|SHA256SUM_TGZ="53c29507e2405a7ffdbba627e6d64856089b094867479edc5ede4105c1da0d65"|' Oracle-Java8-installer.*
Sudo sed -i 's|J_DIR=jdk1.8.0_181|J_DIR=jdk1.8.0_191|' Oracle-Java8-installer.*
Ce qui suit a fonctionné dans Ubuntu 18.10
cd /var/lib/dpkg/info
sed -i 's|Java_VERSION=8u191|Java_VERSION=8u201|' Oracle-Java8-installer.*
sed -i 's|PARTNER_URL=http://download.Oracle.com/otn-pub/Java/jdk/8u191-b12/2787e4a523244c269598db4e85c51e0c/|PARTNER_URL=http://download.Oracle.com/otn-pub/Java/jdk/8u201-b09/42970487e3af4f5aa5bca3f542482c60/|' Oracle-Java8-installer.*
sed -i 's|SHA256SUM_TGZ="53c29507e2405a7ffdbba627e6d64856089b094867479edc5ede4105c1da0d65"|SHA256SUM_TGZ="cb700cc0ac3ddc728a567c350881ce7e25118eaf7ca97ca9705d4580c506e370"|' Oracle-Java8-installer.*
sed -i 's|J_DIR=jdk1.8.0_191|J_DIR=jdk1.8.0_201|' Oracle-Java8-installer.*