Install Ubuntu using tar file

Hello there,

I have downloaded java jdk-8u144-linux-x64.tar and put it in this location /var/cache/oracle-jdk8-installer and then I add the java 8 repo to apt-get like so
sudo add-apt-repository ppa:webupd8team/java

Open in new window

and then when i try to install java using the following cmd
sudo apt-get install oracle-java8-set-default

Open in new window

. I get error that

The following NEW packages will be installed:
  oracle-java8-set-default
0 upgraded, 1 newly installed, 0 to remove and 132 not upgraded.
1 not fully installed or removed.
Need to get 0 B/6,788 B of archives.
After this operation, 20.5 kB of additional disk space will be used.
Setting up oracle-java8-installer (8u151-1~webupd8~0) ...
Installing from local file /var/cache/oracle-jdk8-installer/jdk-8u151-linux-x64.tar.gz
Removing outdated cached downloads...
sha256sum mismatch jdk-8u151-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
Errors were encountered while processing:
 oracle-java8-installer
E: Sub-process /usr/bin/dpkg returned an error code (1)

I know the cause of the error and that is it is trying to install the latest version which is 151 and I have version 144 in the /var/cache/oracle-jdk8-installer folder. How can I tell it to use that 144 and not try to use the latest version.

cheers
Zolf
zolfAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

arnoldCommented:
Please run the following command, and post the resulting output
gzip -cd < /var/cache/oracle-jdk8-installer/jdk-8u151-linux-x64.tar.gz | tar -vtf -


Trying to see the contents table of the archive.

The error seems to point to a signature mismatch.
0
arnoldCommented:
The site http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html includes the checksum link for the version you download, double check the checksum in the list matched the checksum of your package.
0
zolfAuthor Commented:
thanks for your feedback.
double check the checksum in the list matched the checksum of your package.
can you please elaborate on this as to how I can check
0
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

zolfAuthor Commented:
here is the output from that command you posted. See attached file
ubuntu.txt
0
zolfAuthor Commented:
error i get is

zaj@zajd2:/var/cache/oracle-jdk8-installer$ sudo apt-get install oracle-java8-set-default
[sudo] password for zaj:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  oracle-java8-set-default
0 upgraded, 1 newly installed, 0 to remove and 191 not upgraded.
1 not fully installed or removed.
Need to get 0 B/6,788 B of archives.
After this operation, 20.5 kB of additional disk space will be used.
Setting up oracle-java8-installer (8u151-1~webupd8~0) ...
Using wget settings from /var/cache/oracle-jdk8-installer/wgetrc
Downloading Oracle Java 8...
--2017-11-21 11:26:05--  http://download.oracle.com/otn-pub/java/jdk/8u151-b12/e758a0de34e24606bca991d704f6dcbf/jdk-8u151-linux-x64.tar.gz
Resolving download.oracle.com (download.oracle.com)... 185.48.240.224, 185.48.240.219
Connecting to download.oracle.com (download.oracle.com)|185.48.240.224|:80... connected.
HTTP request sent, awaiting response... 403 Forbidden
2017-11-21 11:26:06 ERROR 403: Forbidden.

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)
zaj@zajd2:/var/cache/oracle-jdk8-installer$

Open in new window

0
arnoldCommented:
IN your prior attempt, the error related to the checksum mismatch.

Installing from local file /var/cache/oracle-jdk8-installer/jdk-8u151-linux-x64.tar.gz
Removing outdated cached downloads...
sha256sum mism

I'm not certain you can provide an option to apt-get to not validate if you manually run sha256sum of the tar.gz
Compared to the info on the link for 8.0..
0
CEHJCommented:
Why not use openjdk-8-jdk or even openjdk-9-jdk?
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
David FavorLinux/LXD/WordPress/Hosting SavantCommented:
Try this...

apt-get update
apt-cache policy oracle-java8-set-default

Open in new window


And post output.

Let's make sure all's well before proceeding.
0
David FavorLinux/LXD/WordPress/Hosting SavantCommented:
Just re-read your original question.

This step is likely the problem.

I have downloaded java jdk-8u144-linux-x64.tar and put it in this location /var/cache/oracle-jdk8-installer

You should never muck about with the packaging system. Try deleting this file + then do the two steps listed above + post the output.
0
CEHJCommented:
I personally would never install anything outside the package manager, unless there's no alternative. And there are (see above)
1
arnoldCommented:
The second attempt seems to be that, but getting 403 and 401 errors on the retrieval attempt.

Presumably you need a specific JDk and not one from Ubuntu?

The install directions are at https://docs.oracle.com/javase/8/docs/technotes/guides/install/linux_jdk.html#BJFJJEFG
you could extract/unarchive the files in /usr/local and then create the requisite paths. to bin/man
another option is to once extracted........

try:
apt-get install openjdk-8-jdk
0
David FavorLinux/LXD/WordPress/Hosting SavantCommented:
Mucking about with the package manager cache is a recipe for disaster.

I would not attempt any additional actions till all files you manually added are removed.

If you accidentally get a package somehow, partially installed, then it will be a long road for you to fix your entire package management system.
0
zolfAuthor Commented:
cheers mate, it was so straight forward using the openjdk
0
CEHJCommented:
:)
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux

From novice to tech pro — start learning today.