Skip to content
This repository has been archived by the owner on Apr 9, 2019. It is now read-only.

jdk-6u31-linux-i586.bin: invalid number of bytes #18

Closed
josvazg opened this issue Mar 27, 2012 · 11 comments
Closed

jdk-6u31-linux-i586.bin: invalid number of bytes #18

josvazg opened this issue Mar 27, 2012 · 11 comments

Comments

@josvazg
Copy link

josvazg commented Mar 27, 2012

The repository building process fails with this message:
Downloading common.sh
[x] Installing Java build requirements success
[x] Making build directories success
[x] Removing clones of https://github.com/rraptorr/sun-java6 success
[x] Cloning https://github.com/rraptorr/sun-java6 success
[x] Checking out v6.31-1 success
[x] Getting Java SE download pagesuccess
[x] Getting current release download page success
[x] Downloading jdk-6u31-linux-i586.bin : 81.34 MB success
[x] Symlinking jdk-6u31-linux-i586.bin success
[x] Downloading jdk-6u31-linux-x64.bin : 81.62 MB success
[x] Symlinking jdk-6u31-linux-x64.bin success
[x] Updating the changelog success
[x] Building the packages success
ERROR! Packages failed to build. Please raise an issue with the upstream script developer - https://github.com/rraptorr/sun-java6/issues

The last lines of the log are:

rm -rf jdk1.6.0_31
binsize=$(wc -c jdk-6u31-linux-i586.bin | awk '{print $1}');
zipstart=$(unzip -ql jdk-6u31-linux-i586.bin 2>&1 >/dev/null | sed -n -e 's/.* ([0-9][0-9]) extra bytes./\1/p');
tail -c $(expr $binsize - $zipstart) jdk-6u31-linux-i586.bin > tmp-jdk.zip
expr: syntax error
tail: jdk-6u31-linux-i586.bin: invalid number of bytes
make: *** [unpack-i586-stamp] Error 1
dpkg-buildpackage: fallo: debian/rules build devolvió un estado de salida de error 2
30810's retcode: 2
success

@henyojess
Copy link

+1 on this issue.

I mean I also encountered it trying to install java on a fresh VM

@dront78
Copy link

dront78 commented Mar 27, 2012

+1 issue. please fix

@jonmort
Copy link

jonmort commented Mar 27, 2012

The problem is that oracle prevents direct download of the .bin file. The download page now redirects to http://download.oracle.com/errors/download-fail-1505220.html because of a missing cookie. Oracle is forcing users to accept the EULA.

 [x] Downloading jdk-6u31-linux-i586.bin : 81.34 MB   --2012-03-27 12:53:58--  http://download.oracle.com/otn-pub/java/jdk/6u31-b04/jdk-6u31-linux-i586.bin
Resolving download.oracle.com... 92.122.124.41, 92.122.124.32
Connecting to download.oracle.com|92.122.124.41|:80... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: https://edelivery.oracle.com/otn-pub/java/jdk/6u31-b04/jdk-6u31-linux-i586.bin [following]
--2012-03-27 12:53:58--  https://edelivery.oracle.com/otn-pub/java/jdk/6u31-b04/jdk-6u31-linux-i586.bin
Resolving edelivery.oracle.com... 2.18.226.174
Connecting to edelivery.oracle.com|2.18.226.174|:443... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: http://download.oracle.com/errors/download-fail-1505220.html [following]
--2012-03-27 12:53:59--  http://download.oracle.com/errors/download-fail-1505220.html
Connecting to download.oracle.com|92.122.124.41|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 5307 (5.2K) [text/html]
Saving to: `/var/local/oab/pkg/jdk-6u31-linux-i586.bin'

@yoyosan
Copy link

yoyosan commented Mar 28, 2012

+1

@s0ckz
Copy link

s0ckz commented Mar 28, 2012

Hi, while this isn't solved I did the following:

  1. Downloaded the jdk-6u31-linux-i586.bin and jdk-6u31-linux-x64.bin from Oracle.
  2. Moved these two files to /var/local/oab/pkg/
  3. At line 295 of the script oab-java6.sh:
    wget -c "${DOWNLOAD_URL}" -O /var/local/oab/pkg/${JAVA_BIN} >> "$log" 2>&1 &
    I just commented this line and executed the script.

Obviously its not the best solution. But solves the problem if you can't wait the good solution...

@rraptorr
Copy link

For the last few days people are reporting this exact problem on my project due to a message that suggests them to do so.
I don't believe any automated download of Java packages will work as Oracle really doesn't like it. I'd recommend at least adding checksum validation to be sure the files were downloaded successfully.

@mikkorantalainen
Copy link

It seems that it's possible to download *.bin files via "http://java.com/en/download/manual.jsp?locale=en" directly without cookies or javascript. Unfortunately, the URLs do not make any sense so one needs to parse the HTML to locate the correct label and then proceed to fetch the file.

For example, link "Linux (self-extracting file)" points to "http://javadl.sun.com/webapps/download/AutoDL?BundleId=59621" which will emit the correct contents for jre-6u31-linux-i586.bin (or at least that binary is self-extracing sh script). It might be doable to search for

<a title=" Download Java software for Linux (self-extracting file)" href="(.*?)"

and

<a title=" Download Java software for Linux x64" href="(.*?)"

to extract download URLs from the URL "http://java.com/en/download/manual.jsp?locale=en".

@Olivia5k
Copy link

+1 for this as well

@miah
Copy link

miah commented Mar 30, 2012

I spent a bit of time on the Oracle site last night and looked at the problem.

You can grab the file like so:

curl -OL -b "oraclelicensejdk-6u31-oth-JPR=accept-securebackup-cookie;gpw_e24=http://edelivery.oracle.com" 'http://download.oracle.com/otn-pub/java/jdk/6u31-b04/jdk-6u31-linux-x64.bin'

@mpolden
Copy link
Contributor

mpolden commented Mar 31, 2012

Fixed in this pull request: #20

@daemon23
Copy link

As of version 26, this is happening again.

This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests