Home » Java » Can't install java sdk, webupd8team repo gives sha256 errors and tar.gz from oracle gives broken output on Ubuntu 18.04

Can't install java sdk, webupd8team repo gives sha256 errors and tar.gz from oracle gives broken output on Ubuntu 18.04

Posted by: admin August 11, 2018 Leave a comment

Questions:

When attempting to install java from the linuxuprising/java or ppa:webupd8team/java i get an error like this

    Hash Sum mismatch
   Hashes of expected file:
    - SHA256:973d8ef6268da61e1003963186b8157207c6bc6e48d37d5e11fc2a5885a5b708
    - SHA1:28ede7da1dca520a59f4d7787511742c9b923084 [weak]
    - MD5Sum:7ba8544ff3e98f3c13d07a1803916781 [weak]
    - Filesize:78077648 [weak]
   Hashes of received file:
    - SHA256:ddb59fc787e254508a3cab0eec31bf0139b9510d83591e0f54a605e6a1f5615b
    - SHA1:1d78a279a988822b0c34312b284e73cd02103425 [weak]
    - MD5Sum:f44ade468641a9aea12a59539886c580 [weak]
    - Filesize:78077648 [weak]

I’ve tried installing from multiple version across both repos. I’ve also tried installation oracle.com but when running tar -xzf jdk-version.tar.gz on the downloaded file i get an output like this, regardless of the jdk version i download from their site

$ sudo tar -xzf jdk-8u181-linux-x64.tar.gz 
tar: Skipping to next header
tar: Archive contains ‘*\264\0\005*\264\0\a’ where numeric mode_t value expected
tar: Archive contains ‘I\003\0\001\0\032\0\030\0\001\0\023’ where numeric time_t value expected
tar: Archive contains ‘\207o\257\0\0\0\002’ where numeric uid_t value expected
tar: Archive contains ‘\024\0\0\0\006\0\001’ where numeric gid_t value expected
tar: *Y�: implausibly old time stamp 1969-12-31 18:59:59
tar: Skipping to next header
tar: Exiting with failure status due to previous errors

It also generates an empty file called *Y� (invalid encoding)

I’ve very lost at this point, and would like to just get jdk working. I feel like something is corrupted but how? why?

Answers: