I want to install oracle-java8 on Linux but Ubuntu says: already the newest version
I was following sudo apt-get update to add the java 8 repo to apt-get
$ sudo add-apt-repository ppa:webupd8team/java
Again update the apt-get repo
$ sudo apt-get update
Finally install java 8
$ sudo apt-get install oracle-java8-installer
but I had a lot of errors, so I fixed and reinstalled them, but now it shows this image:

ho@jhost:~$ sudo apt-get install oracle-java8-installer
Reading package lists... Done
Building dependency tree
Reading state information... Done
oracle-java8-installer is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
so I want to know java version is 8
ho@jhost:~$ java -version
java version "1.5.0"
gij (GNU libgcj) version 4.8.4
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE
I need a solution to install oracle-java8
apt package-management updates java oracle
add a comment |
I was following sudo apt-get update to add the java 8 repo to apt-get
$ sudo add-apt-repository ppa:webupd8team/java
Again update the apt-get repo
$ sudo apt-get update
Finally install java 8
$ sudo apt-get install oracle-java8-installer
but I had a lot of errors, so I fixed and reinstalled them, but now it shows this image:

ho@jhost:~$ sudo apt-get install oracle-java8-installer
Reading package lists... Done
Building dependency tree
Reading state information... Done
oracle-java8-installer is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
so I want to know java version is 8
ho@jhost:~$ java -version
java version "1.5.0"
gij (GNU libgcj) version 4.8.4
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE
I need a solution to install oracle-java8
apt package-management updates java oracle
2
Possible duplicate of Can't get Java to update from Java 7 to Java 8
– karel
Jan 16 at 7:55
add a comment |
I was following sudo apt-get update to add the java 8 repo to apt-get
$ sudo add-apt-repository ppa:webupd8team/java
Again update the apt-get repo
$ sudo apt-get update
Finally install java 8
$ sudo apt-get install oracle-java8-installer
but I had a lot of errors, so I fixed and reinstalled them, but now it shows this image:

ho@jhost:~$ sudo apt-get install oracle-java8-installer
Reading package lists... Done
Building dependency tree
Reading state information... Done
oracle-java8-installer is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
so I want to know java version is 8
ho@jhost:~$ java -version
java version "1.5.0"
gij (GNU libgcj) version 4.8.4
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE
I need a solution to install oracle-java8
apt package-management updates java oracle
I was following sudo apt-get update to add the java 8 repo to apt-get
$ sudo add-apt-repository ppa:webupd8team/java
Again update the apt-get repo
$ sudo apt-get update
Finally install java 8
$ sudo apt-get install oracle-java8-installer
but I had a lot of errors, so I fixed and reinstalled them, but now it shows this image:

ho@jhost:~$ sudo apt-get install oracle-java8-installer
Reading package lists... Done
Building dependency tree
Reading state information... Done
oracle-java8-installer is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
so I want to know java version is 8
ho@jhost:~$ java -version
java version "1.5.0"
gij (GNU libgcj) version 4.8.4
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE
I need a solution to install oracle-java8
apt package-management updates java oracle
apt package-management updates java oracle
edited Jan 16 at 14:49
Codito ergo sum
1,5043825
1,5043825
asked Jan 16 at 6:19
Lee JaehoLee Jaeho
11
11
2
Possible duplicate of Can't get Java to update from Java 7 to Java 8
– karel
Jan 16 at 7:55
add a comment |
2
Possible duplicate of Can't get Java to update from Java 7 to Java 8
– karel
Jan 16 at 7:55
2
2
Possible duplicate of Can't get Java to update from Java 7 to Java 8
– karel
Jan 16 at 7:55
Possible duplicate of Can't get Java to update from Java 7 to Java 8
– karel
Jan 16 at 7:55
add a comment |
2 Answers
2
active
oldest
votes
You can select the system wide java default executable via update-alternatives. Run the update-alternatives command with --list option to see the currently installed alternatives:
$ update-alternatives --list java
/usr/lib/jvm/java-11-openjdk-amd64/bin/java
...
Than change the default to your required java version with:
$ sudo update-alternatives --config java
and follow the instruction on the screen.
add a comment |
Thanks all
I solved my problem
I notice to this part
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...
--2019-01-15 23:12:17-- http://download.oracle.com/otn-pub/java/jdk/8u191-b12/2787e4a523244c269598db4e85c51e0c/jdk-8u191-linux-x64.tar.gz
Resolving download.oracle.com (download.oracle.com)... 23.53.224.97
Connecting to download.oracle.com (download.oracle.com)|23.53.224.97|:80... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: https://edelivery.oracle.com/otn-pub/java/jdk/8u191-b12/2787e4a523244c269598db4e85c51e0c/jdk-8u191-linux-x64.tar.gz [following]
--2019-01-15 23:12:18-- https://edelivery.oracle.com/otn-pub/java/jdk/8u191-b12/2787e4a523244c269598db4e85c51e0c/jdk-8u191-linux-x64.tar.gz
Resolving edelivery.oracle.com (edelivery.oracle.com)... 202.43.54.193, 2600:1417:e:285::366, 2600:1417:e:287::366
Connecting to edelivery.oracle.com (edelivery.oracle.com)|202.43.54.193|:443... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: http://download.oracle.com/otn-pub/java/jdk/8u191-b12/2787e4a523244c269598db4e85c51e0c/jdk-8u191-linux-x64.tar.gz?AuthParam=1547622858_9fc82e1ca238e15632f057856bbea8e9 [following]
--2019-01-15 23:12:18-- http://download.oracle.com/otn-pub/java/jdk/8u191-b12/2787e4a523244c269598db4e85c51e0c/jdk-8u191-linux-x64.tar.gz?AuthParam=1547622858_9fc82e1ca238e15632f057856bbea8e9
Connecting to download.oracle.com (download.oracle.com)|23.53.224.97|:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: https://download.oracle.com/otn-pub/java/jdk/8u191-b12/2787e4a523244c269598db4e85c51e0c/jdk-8u191-linux-x64.tar.gz?AuthParam=1547622858_9fc82e1ca238e15632f057856bbea8e9 [following]
--2019-01-15 23:12:18-- https://download.oracle.com/otn-pub/java/jdk/8u191-b12/2787e4a523244c269598db4e85c51e0c/jdk-8u191-linux-x64.tar.gz?AuthParam=1547622858_9fc82e1ca238e15632f057856bbea8e9
Connecting to download.oracle.com (download.oracle.com)|23.53.224.97|:443... connected.
HTTP request sent, awaiting response... 404 Not Found
2019-01-15 23:12:19 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
Errors were encountered while processing:
oracle-java8-installer
E: Sub-process /usr/bin/dpkg returned an error code (1)
ho@jhost:~$ java -version
The program 'java' can be found in the following packages:
* default-jre
* gcj-4.8-jre-headless
* openjdk-7-jre-headless
* gcj-4.6-jre-headless
* openjdk-6-jre-headless
Try: sudo apt-get install <selected package>
So I think it have to problem with URL path, java8 release version and sha256.
ho@jhost:~/Downloads$ sha256sum jdk-8u202-linux-x64.tar.gz
Find sha256 of tar.gz file,
ho@jhost:/var/lib/dpkg/info$ sudo sed -i 's|SHA256SUM_TGZ="53c29507e2405a7ffdbba627e6d64856089b094867479edc5ede4105c1da0d65"|SHA256SUM_TGZ="9a5c32411a6a06e22b69c495b7975034409fa1652d03aeb8eb5b6f59fd4594e0"|' oracle-java8-installer.*
oracle-java8-installer pointed 8u191 version. so changed several things.
ho@jhost:/var/lib/dpkg/info$ sudo sed -i 's|JAVA_VERSION=8u191|JAVA_VERSION=8u202|' oracle-java8-installer.*
ho@jhost:/var/lib/dpkg/info$ sudo sed -i 's|J_DIR=jdk1.8.0_191|J_DIR=jdk1.8.0_202|' oracle-java8-installer.*
ho@jhost:/var/lib/dpkg/info$ sudo sed -i 's|PARTNER_URL=http://download.oracle.com/otn-pub/java/jdk/8u191-b12/2787e4a523244c269598db4e85c51e0c/|PARTNER_URL=https://download.oracle.com/otn-pub/java/jdk/8u202-b08/1961070e4c9b4e26a04e7f5a083f551e/|' oracle-java8-installer.*
And then,
ho@jhost:~/Downloads$ sudo apt-get install oracle-java8-installer
Oracle JDK 8 installed
#####Important########
To set Oracle JDK8 as default, install the "oracle-java8-set-default" package.
E.g.: sudo apt install oracle-java8-set-default
On Ubuntu systems, oracle-java8-set-default is most probably installed
automatically with this package.
######################
I did it! thanks all again.
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1110161%2fi-want-to-install-oracle-java8-on-linux-but-ubuntu-says-already-the-newest-vers%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
You can select the system wide java default executable via update-alternatives. Run the update-alternatives command with --list option to see the currently installed alternatives:
$ update-alternatives --list java
/usr/lib/jvm/java-11-openjdk-amd64/bin/java
...
Than change the default to your required java version with:
$ sudo update-alternatives --config java
and follow the instruction on the screen.
add a comment |
You can select the system wide java default executable via update-alternatives. Run the update-alternatives command with --list option to see the currently installed alternatives:
$ update-alternatives --list java
/usr/lib/jvm/java-11-openjdk-amd64/bin/java
...
Than change the default to your required java version with:
$ sudo update-alternatives --config java
and follow the instruction on the screen.
add a comment |
You can select the system wide java default executable via update-alternatives. Run the update-alternatives command with --list option to see the currently installed alternatives:
$ update-alternatives --list java
/usr/lib/jvm/java-11-openjdk-amd64/bin/java
...
Than change the default to your required java version with:
$ sudo update-alternatives --config java
and follow the instruction on the screen.
You can select the system wide java default executable via update-alternatives. Run the update-alternatives command with --list option to see the currently installed alternatives:
$ update-alternatives --list java
/usr/lib/jvm/java-11-openjdk-amd64/bin/java
...
Than change the default to your required java version with:
$ sudo update-alternatives --config java
and follow the instruction on the screen.
answered Jan 16 at 7:49
Simon SudlerSimon Sudler
1,493314
1,493314
add a comment |
add a comment |
Thanks all
I solved my problem
I notice to this part
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...
--2019-01-15 23:12:17-- http://download.oracle.com/otn-pub/java/jdk/8u191-b12/2787e4a523244c269598db4e85c51e0c/jdk-8u191-linux-x64.tar.gz
Resolving download.oracle.com (download.oracle.com)... 23.53.224.97
Connecting to download.oracle.com (download.oracle.com)|23.53.224.97|:80... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: https://edelivery.oracle.com/otn-pub/java/jdk/8u191-b12/2787e4a523244c269598db4e85c51e0c/jdk-8u191-linux-x64.tar.gz [following]
--2019-01-15 23:12:18-- https://edelivery.oracle.com/otn-pub/java/jdk/8u191-b12/2787e4a523244c269598db4e85c51e0c/jdk-8u191-linux-x64.tar.gz
Resolving edelivery.oracle.com (edelivery.oracle.com)... 202.43.54.193, 2600:1417:e:285::366, 2600:1417:e:287::366
Connecting to edelivery.oracle.com (edelivery.oracle.com)|202.43.54.193|:443... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: http://download.oracle.com/otn-pub/java/jdk/8u191-b12/2787e4a523244c269598db4e85c51e0c/jdk-8u191-linux-x64.tar.gz?AuthParam=1547622858_9fc82e1ca238e15632f057856bbea8e9 [following]
--2019-01-15 23:12:18-- http://download.oracle.com/otn-pub/java/jdk/8u191-b12/2787e4a523244c269598db4e85c51e0c/jdk-8u191-linux-x64.tar.gz?AuthParam=1547622858_9fc82e1ca238e15632f057856bbea8e9
Connecting to download.oracle.com (download.oracle.com)|23.53.224.97|:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: https://download.oracle.com/otn-pub/java/jdk/8u191-b12/2787e4a523244c269598db4e85c51e0c/jdk-8u191-linux-x64.tar.gz?AuthParam=1547622858_9fc82e1ca238e15632f057856bbea8e9 [following]
--2019-01-15 23:12:18-- https://download.oracle.com/otn-pub/java/jdk/8u191-b12/2787e4a523244c269598db4e85c51e0c/jdk-8u191-linux-x64.tar.gz?AuthParam=1547622858_9fc82e1ca238e15632f057856bbea8e9
Connecting to download.oracle.com (download.oracle.com)|23.53.224.97|:443... connected.
HTTP request sent, awaiting response... 404 Not Found
2019-01-15 23:12:19 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
Errors were encountered while processing:
oracle-java8-installer
E: Sub-process /usr/bin/dpkg returned an error code (1)
ho@jhost:~$ java -version
The program 'java' can be found in the following packages:
* default-jre
* gcj-4.8-jre-headless
* openjdk-7-jre-headless
* gcj-4.6-jre-headless
* openjdk-6-jre-headless
Try: sudo apt-get install <selected package>
So I think it have to problem with URL path, java8 release version and sha256.
ho@jhost:~/Downloads$ sha256sum jdk-8u202-linux-x64.tar.gz
Find sha256 of tar.gz file,
ho@jhost:/var/lib/dpkg/info$ sudo sed -i 's|SHA256SUM_TGZ="53c29507e2405a7ffdbba627e6d64856089b094867479edc5ede4105c1da0d65"|SHA256SUM_TGZ="9a5c32411a6a06e22b69c495b7975034409fa1652d03aeb8eb5b6f59fd4594e0"|' oracle-java8-installer.*
oracle-java8-installer pointed 8u191 version. so changed several things.
ho@jhost:/var/lib/dpkg/info$ sudo sed -i 's|JAVA_VERSION=8u191|JAVA_VERSION=8u202|' oracle-java8-installer.*
ho@jhost:/var/lib/dpkg/info$ sudo sed -i 's|J_DIR=jdk1.8.0_191|J_DIR=jdk1.8.0_202|' oracle-java8-installer.*
ho@jhost:/var/lib/dpkg/info$ sudo sed -i 's|PARTNER_URL=http://download.oracle.com/otn-pub/java/jdk/8u191-b12/2787e4a523244c269598db4e85c51e0c/|PARTNER_URL=https://download.oracle.com/otn-pub/java/jdk/8u202-b08/1961070e4c9b4e26a04e7f5a083f551e/|' oracle-java8-installer.*
And then,
ho@jhost:~/Downloads$ sudo apt-get install oracle-java8-installer
Oracle JDK 8 installed
#####Important########
To set Oracle JDK8 as default, install the "oracle-java8-set-default" package.
E.g.: sudo apt install oracle-java8-set-default
On Ubuntu systems, oracle-java8-set-default is most probably installed
automatically with this package.
######################
I did it! thanks all again.
add a comment |
Thanks all
I solved my problem
I notice to this part
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...
--2019-01-15 23:12:17-- http://download.oracle.com/otn-pub/java/jdk/8u191-b12/2787e4a523244c269598db4e85c51e0c/jdk-8u191-linux-x64.tar.gz
Resolving download.oracle.com (download.oracle.com)... 23.53.224.97
Connecting to download.oracle.com (download.oracle.com)|23.53.224.97|:80... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: https://edelivery.oracle.com/otn-pub/java/jdk/8u191-b12/2787e4a523244c269598db4e85c51e0c/jdk-8u191-linux-x64.tar.gz [following]
--2019-01-15 23:12:18-- https://edelivery.oracle.com/otn-pub/java/jdk/8u191-b12/2787e4a523244c269598db4e85c51e0c/jdk-8u191-linux-x64.tar.gz
Resolving edelivery.oracle.com (edelivery.oracle.com)... 202.43.54.193, 2600:1417:e:285::366, 2600:1417:e:287::366
Connecting to edelivery.oracle.com (edelivery.oracle.com)|202.43.54.193|:443... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: http://download.oracle.com/otn-pub/java/jdk/8u191-b12/2787e4a523244c269598db4e85c51e0c/jdk-8u191-linux-x64.tar.gz?AuthParam=1547622858_9fc82e1ca238e15632f057856bbea8e9 [following]
--2019-01-15 23:12:18-- http://download.oracle.com/otn-pub/java/jdk/8u191-b12/2787e4a523244c269598db4e85c51e0c/jdk-8u191-linux-x64.tar.gz?AuthParam=1547622858_9fc82e1ca238e15632f057856bbea8e9
Connecting to download.oracle.com (download.oracle.com)|23.53.224.97|:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: https://download.oracle.com/otn-pub/java/jdk/8u191-b12/2787e4a523244c269598db4e85c51e0c/jdk-8u191-linux-x64.tar.gz?AuthParam=1547622858_9fc82e1ca238e15632f057856bbea8e9 [following]
--2019-01-15 23:12:18-- https://download.oracle.com/otn-pub/java/jdk/8u191-b12/2787e4a523244c269598db4e85c51e0c/jdk-8u191-linux-x64.tar.gz?AuthParam=1547622858_9fc82e1ca238e15632f057856bbea8e9
Connecting to download.oracle.com (download.oracle.com)|23.53.224.97|:443... connected.
HTTP request sent, awaiting response... 404 Not Found
2019-01-15 23:12:19 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
Errors were encountered while processing:
oracle-java8-installer
E: Sub-process /usr/bin/dpkg returned an error code (1)
ho@jhost:~$ java -version
The program 'java' can be found in the following packages:
* default-jre
* gcj-4.8-jre-headless
* openjdk-7-jre-headless
* gcj-4.6-jre-headless
* openjdk-6-jre-headless
Try: sudo apt-get install <selected package>
So I think it have to problem with URL path, java8 release version and sha256.
ho@jhost:~/Downloads$ sha256sum jdk-8u202-linux-x64.tar.gz
Find sha256 of tar.gz file,
ho@jhost:/var/lib/dpkg/info$ sudo sed -i 's|SHA256SUM_TGZ="53c29507e2405a7ffdbba627e6d64856089b094867479edc5ede4105c1da0d65"|SHA256SUM_TGZ="9a5c32411a6a06e22b69c495b7975034409fa1652d03aeb8eb5b6f59fd4594e0"|' oracle-java8-installer.*
oracle-java8-installer pointed 8u191 version. so changed several things.
ho@jhost:/var/lib/dpkg/info$ sudo sed -i 's|JAVA_VERSION=8u191|JAVA_VERSION=8u202|' oracle-java8-installer.*
ho@jhost:/var/lib/dpkg/info$ sudo sed -i 's|J_DIR=jdk1.8.0_191|J_DIR=jdk1.8.0_202|' oracle-java8-installer.*
ho@jhost:/var/lib/dpkg/info$ sudo sed -i 's|PARTNER_URL=http://download.oracle.com/otn-pub/java/jdk/8u191-b12/2787e4a523244c269598db4e85c51e0c/|PARTNER_URL=https://download.oracle.com/otn-pub/java/jdk/8u202-b08/1961070e4c9b4e26a04e7f5a083f551e/|' oracle-java8-installer.*
And then,
ho@jhost:~/Downloads$ sudo apt-get install oracle-java8-installer
Oracle JDK 8 installed
#####Important########
To set Oracle JDK8 as default, install the "oracle-java8-set-default" package.
E.g.: sudo apt install oracle-java8-set-default
On Ubuntu systems, oracle-java8-set-default is most probably installed
automatically with this package.
######################
I did it! thanks all again.
add a comment |
Thanks all
I solved my problem
I notice to this part
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...
--2019-01-15 23:12:17-- http://download.oracle.com/otn-pub/java/jdk/8u191-b12/2787e4a523244c269598db4e85c51e0c/jdk-8u191-linux-x64.tar.gz
Resolving download.oracle.com (download.oracle.com)... 23.53.224.97
Connecting to download.oracle.com (download.oracle.com)|23.53.224.97|:80... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: https://edelivery.oracle.com/otn-pub/java/jdk/8u191-b12/2787e4a523244c269598db4e85c51e0c/jdk-8u191-linux-x64.tar.gz [following]
--2019-01-15 23:12:18-- https://edelivery.oracle.com/otn-pub/java/jdk/8u191-b12/2787e4a523244c269598db4e85c51e0c/jdk-8u191-linux-x64.tar.gz
Resolving edelivery.oracle.com (edelivery.oracle.com)... 202.43.54.193, 2600:1417:e:285::366, 2600:1417:e:287::366
Connecting to edelivery.oracle.com (edelivery.oracle.com)|202.43.54.193|:443... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: http://download.oracle.com/otn-pub/java/jdk/8u191-b12/2787e4a523244c269598db4e85c51e0c/jdk-8u191-linux-x64.tar.gz?AuthParam=1547622858_9fc82e1ca238e15632f057856bbea8e9 [following]
--2019-01-15 23:12:18-- http://download.oracle.com/otn-pub/java/jdk/8u191-b12/2787e4a523244c269598db4e85c51e0c/jdk-8u191-linux-x64.tar.gz?AuthParam=1547622858_9fc82e1ca238e15632f057856bbea8e9
Connecting to download.oracle.com (download.oracle.com)|23.53.224.97|:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: https://download.oracle.com/otn-pub/java/jdk/8u191-b12/2787e4a523244c269598db4e85c51e0c/jdk-8u191-linux-x64.tar.gz?AuthParam=1547622858_9fc82e1ca238e15632f057856bbea8e9 [following]
--2019-01-15 23:12:18-- https://download.oracle.com/otn-pub/java/jdk/8u191-b12/2787e4a523244c269598db4e85c51e0c/jdk-8u191-linux-x64.tar.gz?AuthParam=1547622858_9fc82e1ca238e15632f057856bbea8e9
Connecting to download.oracle.com (download.oracle.com)|23.53.224.97|:443... connected.
HTTP request sent, awaiting response... 404 Not Found
2019-01-15 23:12:19 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
Errors were encountered while processing:
oracle-java8-installer
E: Sub-process /usr/bin/dpkg returned an error code (1)
ho@jhost:~$ java -version
The program 'java' can be found in the following packages:
* default-jre
* gcj-4.8-jre-headless
* openjdk-7-jre-headless
* gcj-4.6-jre-headless
* openjdk-6-jre-headless
Try: sudo apt-get install <selected package>
So I think it have to problem with URL path, java8 release version and sha256.
ho@jhost:~/Downloads$ sha256sum jdk-8u202-linux-x64.tar.gz
Find sha256 of tar.gz file,
ho@jhost:/var/lib/dpkg/info$ sudo sed -i 's|SHA256SUM_TGZ="53c29507e2405a7ffdbba627e6d64856089b094867479edc5ede4105c1da0d65"|SHA256SUM_TGZ="9a5c32411a6a06e22b69c495b7975034409fa1652d03aeb8eb5b6f59fd4594e0"|' oracle-java8-installer.*
oracle-java8-installer pointed 8u191 version. so changed several things.
ho@jhost:/var/lib/dpkg/info$ sudo sed -i 's|JAVA_VERSION=8u191|JAVA_VERSION=8u202|' oracle-java8-installer.*
ho@jhost:/var/lib/dpkg/info$ sudo sed -i 's|J_DIR=jdk1.8.0_191|J_DIR=jdk1.8.0_202|' oracle-java8-installer.*
ho@jhost:/var/lib/dpkg/info$ sudo sed -i 's|PARTNER_URL=http://download.oracle.com/otn-pub/java/jdk/8u191-b12/2787e4a523244c269598db4e85c51e0c/|PARTNER_URL=https://download.oracle.com/otn-pub/java/jdk/8u202-b08/1961070e4c9b4e26a04e7f5a083f551e/|' oracle-java8-installer.*
And then,
ho@jhost:~/Downloads$ sudo apt-get install oracle-java8-installer
Oracle JDK 8 installed
#####Important########
To set Oracle JDK8 as default, install the "oracle-java8-set-default" package.
E.g.: sudo apt install oracle-java8-set-default
On Ubuntu systems, oracle-java8-set-default is most probably installed
automatically with this package.
######################
I did it! thanks all again.
Thanks all
I solved my problem
I notice to this part
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...
--2019-01-15 23:12:17-- http://download.oracle.com/otn-pub/java/jdk/8u191-b12/2787e4a523244c269598db4e85c51e0c/jdk-8u191-linux-x64.tar.gz
Resolving download.oracle.com (download.oracle.com)... 23.53.224.97
Connecting to download.oracle.com (download.oracle.com)|23.53.224.97|:80... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: https://edelivery.oracle.com/otn-pub/java/jdk/8u191-b12/2787e4a523244c269598db4e85c51e0c/jdk-8u191-linux-x64.tar.gz [following]
--2019-01-15 23:12:18-- https://edelivery.oracle.com/otn-pub/java/jdk/8u191-b12/2787e4a523244c269598db4e85c51e0c/jdk-8u191-linux-x64.tar.gz
Resolving edelivery.oracle.com (edelivery.oracle.com)... 202.43.54.193, 2600:1417:e:285::366, 2600:1417:e:287::366
Connecting to edelivery.oracle.com (edelivery.oracle.com)|202.43.54.193|:443... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: http://download.oracle.com/otn-pub/java/jdk/8u191-b12/2787e4a523244c269598db4e85c51e0c/jdk-8u191-linux-x64.tar.gz?AuthParam=1547622858_9fc82e1ca238e15632f057856bbea8e9 [following]
--2019-01-15 23:12:18-- http://download.oracle.com/otn-pub/java/jdk/8u191-b12/2787e4a523244c269598db4e85c51e0c/jdk-8u191-linux-x64.tar.gz?AuthParam=1547622858_9fc82e1ca238e15632f057856bbea8e9
Connecting to download.oracle.com (download.oracle.com)|23.53.224.97|:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: https://download.oracle.com/otn-pub/java/jdk/8u191-b12/2787e4a523244c269598db4e85c51e0c/jdk-8u191-linux-x64.tar.gz?AuthParam=1547622858_9fc82e1ca238e15632f057856bbea8e9 [following]
--2019-01-15 23:12:18-- https://download.oracle.com/otn-pub/java/jdk/8u191-b12/2787e4a523244c269598db4e85c51e0c/jdk-8u191-linux-x64.tar.gz?AuthParam=1547622858_9fc82e1ca238e15632f057856bbea8e9
Connecting to download.oracle.com (download.oracle.com)|23.53.224.97|:443... connected.
HTTP request sent, awaiting response... 404 Not Found
2019-01-15 23:12:19 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
Errors were encountered while processing:
oracle-java8-installer
E: Sub-process /usr/bin/dpkg returned an error code (1)
ho@jhost:~$ java -version
The program 'java' can be found in the following packages:
* default-jre
* gcj-4.8-jre-headless
* openjdk-7-jre-headless
* gcj-4.6-jre-headless
* openjdk-6-jre-headless
Try: sudo apt-get install <selected package>
So I think it have to problem with URL path, java8 release version and sha256.
ho@jhost:~/Downloads$ sha256sum jdk-8u202-linux-x64.tar.gz
Find sha256 of tar.gz file,
ho@jhost:/var/lib/dpkg/info$ sudo sed -i 's|SHA256SUM_TGZ="53c29507e2405a7ffdbba627e6d64856089b094867479edc5ede4105c1da0d65"|SHA256SUM_TGZ="9a5c32411a6a06e22b69c495b7975034409fa1652d03aeb8eb5b6f59fd4594e0"|' oracle-java8-installer.*
oracle-java8-installer pointed 8u191 version. so changed several things.
ho@jhost:/var/lib/dpkg/info$ sudo sed -i 's|JAVA_VERSION=8u191|JAVA_VERSION=8u202|' oracle-java8-installer.*
ho@jhost:/var/lib/dpkg/info$ sudo sed -i 's|J_DIR=jdk1.8.0_191|J_DIR=jdk1.8.0_202|' oracle-java8-installer.*
ho@jhost:/var/lib/dpkg/info$ sudo sed -i 's|PARTNER_URL=http://download.oracle.com/otn-pub/java/jdk/8u191-b12/2787e4a523244c269598db4e85c51e0c/|PARTNER_URL=https://download.oracle.com/otn-pub/java/jdk/8u202-b08/1961070e4c9b4e26a04e7f5a083f551e/|' oracle-java8-installer.*
And then,
ho@jhost:~/Downloads$ sudo apt-get install oracle-java8-installer
Oracle JDK 8 installed
#####Important########
To set Oracle JDK8 as default, install the "oracle-java8-set-default" package.
E.g.: sudo apt install oracle-java8-set-default
On Ubuntu systems, oracle-java8-set-default is most probably installed
automatically with this package.
######################
I did it! thanks all again.
edited Jan 17 at 4:38
answered Jan 17 at 1:24
Lee JaehoLee Jaeho
11
11
add a comment |
add a comment |
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1110161%2fi-want-to-install-oracle-java8-on-linux-but-ubuntu-says-already-the-newest-vers%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
2
Possible duplicate of Can't get Java to update from Java 7 to Java 8
– karel
Jan 16 at 7:55