LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-08-2004, 07:25 PM   #1
lopoetve
Member
 
Registered: Aug 2001
Distribution: Too many.
Posts: 102

Rep: Reputation: 15
Java SDK won't install, binary file not executable, yoper linux 2.6 kernel


Ok... Yoper linux, Sun Java 1.4.2 SDK (yes, I HAVE to use theirs), 2.6.8 kernel...

I download the file. Fails checksum because tail doesn't work right. Comment out checksum check and it will extract a binary install file, but said file won't run.

The error I got before editing the file was:

> Ok, I got this working in the CSEL, but I can't get it going at home. Kernel
> 2.6.8, Yoper linux, bash shell. I download the .bin file, and then when I try
> to run it (after appropriate chmod +x), I get this:
>
>
> tail: `-1' option is obsolete; use `-n 1'
> Try `tail --help' for more information.
> ./j2sdk-1_4_2_05-linux-i586.bin: line 334: [: -lt: unary operator expected
> Unpacking...
> tail: cannot open `+486' for reading: No such file or directory
> Checksumming...
> 1
> The download file appears to be corrupted. Please refer
> to the Troubleshooting section of the Installation
> Instructions on the download page for more information.
> Please do not attempt to install this archive file.
>
> Anyone seen this before? I've tried redownloading, and it's no good, I get the
> same error. Yoper is built off of RPM, so I even tried that version, and it
> too won't decompress. I don't recognize the errors.
>
> Any help appreciated.
> -Pat

Now, after making the changes for tail to work right

(-n 1), and -c +486, it tries to run the binary file and says that there is an syntax error at line 3

Anyone seen something like this before?!?
 
Old 09-09-2004, 03:51 AM   #2
mdriftmeyer
LQ Newbie
 
Registered: May 2004
Location: Northwest USA
Distribution: Debian Sid
Posts: 5

Rep: Reputation: 0
either sudo or su to root and chmod +x the j2sdk1.4.2_05.bin file to make it executable.

then do the ./j2..... and answer yes to its licensing agreement.

See this documentation here:

http://java.sun.com/j2se/1.4.2/install-linux.html

Excerpt:

2. Make sure that execute permissions are set on the self-extracting binary.

Run this command:
chmod +x j2sdk-1_4_2_<version>-linux-i586.bin

Now regarding to how the system recognizes your path to java that will be a different matter and one you deal with via your shell profile.

I am not up on Yoper but on Debian I can put it anywhere I want and them create links via update-alternatives that will recognize system wide.
 
Old 09-09-2004, 03:49 PM   #3
lopoetve
Member
 
Registered: Aug 2001
Distribution: Too many.
Posts: 102

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by mdriftmeyer
either sudo or su to root and chmod +x the j2sdk1.4.2_05.bin file to make it executable.

then do the ./j2..... and answer yes to its licensing agreement.

See this documentation here:

http://java.sun.com/j2se/1.4.2/install-linux.html

Excerpt:

2. Make sure that execute permissions are set on the self-extracting binary.

Run this command:
chmod +x j2sdk-1_4_2_<version>-linux-i586.bin

Now regarding to how the system recognizes your path to java that will be a different matter and one you deal with via your shell profile.

I am not up on Yoper but on Debian I can put it anywhere I want and them create links via update-alternatives that will recognize system wide.
You don't need to be root to install it for a single user, and I know about chmoding it You could also run: sh ./j2...

It runs, but there are errors and it fails later in the install, right after the liscense agreement.
 
Old 10-01-2004, 01:19 PM   #4
Vampyric
LQ Newbie
 
Registered: Mar 2003
Posts: 27

Rep: Reputation: 15
same problem... does NOT have to do with +x!

I'm having the same problem and have in the past... it's definitely a problem with a new version of "something".
I'm just not sure what the something is yet.

I while back I had an older gentoo install on another machine... copied the exact same bin file over to it (after several failed attempts on the other) and it worked perfectly.

Updating gentoo or installing a fresh copy with 2004.2/net install.... java's bin will NOT work, by default anyway.

Problem being I no longer have that older machine, need java, and can't extract the f'er.

Didn't find anything about it on java.sun.com but, as always is the case, I could have missed it.

Must be a solution, if you know/found it, definitely leave a reply
 
Old 10-01-2004, 01:47 PM   #5
zakaluka
Member
 
Registered: Oct 2003
Posts: 58

Rep: Reputation: 15
This' gonna seem like a stupid question, but do you have the same shell at home and at the CSEL? If so, do you have any other shells on your home computer that could be trying to interpret the script instead of bash? The syntax error you're getting is from the shell not recognizing the different commands.

Regards,

zakaluka2.
 
Old 10-01-2004, 02:32 PM   #6
Vampyric
LQ Newbie
 
Registered: Mar 2003
Posts: 27

Rep: Reputation: 15
found the answer

I've been sitting here for a while and decided to scroll through the code
for java's bin file.

After checking man pages...etc etc

I noticed a few errors that sun must have neglected to fix.
First off... some of the 'tail' syntax is just wrong
and one of sums it says it *should* in in the code... is wrong

open up the bin file with whatever editor you like... I use nano

Go to line 333 and you'll see diskSpace=`df -k . | tail 1 .....................etc

change 'tail 1' to 'tail -n 1'

the current version of tail I'm using says 'tail 1' is obsolete and will be removed in future versions.
so it may or may not have an affect depending on when you're reading this
.... the next step MUST be done for it to work.

go down to about line 341 and you'll see 'tail +486'
that command DOES NOT work
you have to change it to: tail -n +486

Now... last thing... on about line 358 you'll see:
if expr $sum1 !=............etc

make sure the condition is the following:
$sum1 != 13775 || expr $sum2 != 35512


recap:
fix the tail commands
change the sum values if needbe to the ones given above (only sum1 should be wrong)

as a side note:
I kept saying "about line" cause I shoved echo statements in there to see what it was doing
and may have changed the numbers in mine by plus or minus 1 or 2

...Everything should now extract
 
Old 10-02-2004, 12:19 PM   #7
lopoetve
Member
 
Registered: Aug 2001
Distribution: Too many.
Posts: 102

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by zakaluka
This' gonna seem like a stupid question, but do you have the same shell at home and at the CSEL? If so, do you have any other shells on your home computer that could be trying to interpret the script instead of bash? The syntax error you're getting is from the shell not recognizing the different commands.

Regards,

zakaluka2.
Actually, I solved the cause of the error a while back. It's the wrong version of "tail", a program that strips a certain number of bytes off of a file. The file is a combination script/binary file. The script runs, and then tail strips off the script portion and leaves just the binary, which then is supposed to run. Unfortunately, the tail program changed, and now it strips off only part of the text portion of the file.

Vampyric is dead on. Thanks dude!
 
Old 10-04-2004, 08:45 PM   #8
Vampyric
LQ Newbie
 
Registered: Mar 2003
Posts: 27

Rep: Reputation: 15
Any time :)

Any time

I reported the bug and simple solution to Sun so hopefully they'll fix it at some point.
 
Old 10-30-2004, 03:03 AM   #9
nuka_t
Member
 
Registered: Jun 2004
Location: Kalifornia
Distribution: YOPER+KDE
Posts: 263

Rep: Reputation: 30
if anyone is still having problems with this,


http://www.yoper.com/forum2/index.ph...t=0#entry26581
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
java SDK install jet_zeng Linux - Software 5 05-10-2005 11:57 AM
how to install java 2 sdk? pdmackenzie Linux - Software 9 04-07-2004 08:39 AM
Java SDK 1.4.2 install. lifted_one Programming 4 11-06-2003 12:55 AM
Java 1.4.0 SDK install problem insom Linux - Newbie 3 09-05-2003 04:01 AM
Java SDK 1.4 Install KptnKrill Linux - Newbie 6 08-14-2003 08:47 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:08 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration