LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions
User Name
Password
Linux - Distributions This forum is for Distribution specific questions.
Red Hat, Slackware, Debian, Novell, LFS, Mandriva, Ubuntu, Fedora - the list goes on and on... Note: An (*) indicates there is no official participation from that distribution here at LQ.

Notices


Reply
  Search this Thread
Old 07-22-2004, 08:14 PM   #1
exodist
Senior Member
 
Registered: Aug 2003
Location: Portland, Oregon
Distribution: Arch
Posts: 1,374

Rep: Reputation: 47
gentoo java problems.


Gentoo does not have a portage for this version of java:
j2sdk-1_4_2_05

I figured no problem I will just use the self extracting .bin from the java.sun site.

... I get this error message:


tail: `-1' option is obsolete; use `-n 1' since this will be removed in the future
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.


my first thaught was oh ok bad download so I re-download..... same problem..

suspecting the file is fine I scp'd it to a slackware box and ran it... no problems.

soo..... where do I go from here?
 
Old 07-22-2004, 08:35 PM   #2
slackMeUp
Member
 
Registered: Nov 2003
Distribution: Slack-where?
Posts: 654

Rep: Reputation: 30
emerge /usr/portage/dev-java/sun-jdk/sun-jdk-1.4.2.05.ebuild



And make sure to unmerge any jdk you might have installed, unless you want to play around with the $PATH yourself.

Last edited by slackMeUp; 07-22-2004 at 08:36 PM.
 
Old 07-22-2004, 08:38 PM   #3
slackMeUp
Member
 
Registered: Nov 2003
Distribution: Slack-where?
Posts: 654

Rep: Reputation: 30
Not that it matters but you can also grab the 1.5 betas too. ..

sun-jdk-1.2.2.017.ebuild sun-jdk-1.4.2.04-r2.ebuild
sun-jdk-1.3.1.09.ebuild sun-jdk-1.4.2.04.ebuild
sun-jdk-1.3.1.10.ebuild sun-jdk-1.4.2.05.ebuild
sun-jdk-1.3.1.12.ebuild sun-jdk-1.5.0_beta1-r1.ebuild
sun-jdk-1.4.1.06.ebuild sun-jdk-1.5.0_beta2-r1.ebuild
sun-jdk-1.4.2.03.ebuild sun-jdk-1.5.0_beta2.ebuild
sun-jdk-1.4.2.04-r1.ebuild

Each version you can grab from protage is above. . . that sun makes atleast. You can grab others too. . .
 
Old 07-22-2004, 08:41 PM   #4
exodist
Senior Member
 
Registered: Aug 2003
Location: Portland, Oregon
Distribution: Arch
Posts: 1,374

Original Poster
Rep: Reputation: 47
thanx, I think I have it now :-D
 
Old 07-22-2004, 08:47 PM   #5
slackMeUp
Member
 
Registered: Nov 2003
Distribution: Slack-where?
Posts: 654

Rep: Reputation: 30
no prob. . .

Take a look around your /usr/portage directory. . . it has everything.

If you just type "emerge foo" you will get the standard ebuild, but if you give an exact ebuild from your protage tree then you will get exactly what you want.
 
Old 07-22-2004, 08:48 PM   #6
exodist
Senior Member
 
Registered: Aug 2003
Location: Portland, Oregon
Distribution: Arch
Posts: 1,374

Original Poster
Rep: Reputation: 47
thanx, I wa sunaware just how deep the directory tree went, I am used to a different ls color scheme, I will play with that later.
 
Old 07-25-2004, 10:46 AM   #7
equinox
Member
 
Registered: Dec 2003
Location: Johannesburg, South Africa
Posts: 846

Rep: Reputation: 30
or even "emerge search java" should give you info on what's there :P
 
Old 08-16-2004, 08:53 PM   #8
tig
LQ Newbie
 
Registered: Aug 2004
Posts: 1

Rep: Reputation: 0
Workaround

Hello,

I just encountered the same problem. Emerging 1.4.2_05 doesn't seem to be an option if you want the SDK. I dug into the installer a little bit and found the problems. It appears that the gentoo 'tail' command doesn't support the + options anymore unless they are prefixed by -n. For some reason the 'sum' output was incorrect with one of the values too, so disabling that check was necessary.

Create a file called java.patch containing the following:

Code:
--- j2sdk-1_4_2_05-linux-i586.bin       2004-08-16 21:16:49.802123744 -0400
+++ j2sdk-1_4_2_05-linux-i586.bin.mod   2004-08-16 21:09:42.838032152 -0400
@@ -330,7 +330,7 @@
     esac
 done
 outname=install.sfx.$$
-diskSpace=`df -k . | tail -1 | awk '{if ( $4 ~ /%/) { print $3 } else { print $4 } }'`
+diskSpace=`df -k . | tail -n1 | awk '{if ( $4 ~ /%/) { print $3 } else { print $4 } }'`
 if [ $diskSpace -lt $diskSpaceRequired ]; then
     printf "You will need atleast %s kBytes of Disk Free\n" $diskSpaceRequired
     printf "Please free up the required Disk Space and try again\n"
@@ -338,8 +338,8 @@
 fi
 trap 'rm -f $outname; exit 1' HUP INT QUIT TERM
 echo "Unpacking..."
-tail +486 $0 > $outname
-if [ -x /usr/bin/sum ] ; then
+tail -n+486 $0 > $outname
+if [ -x /usr/bin/xsum ] ; then
     echo "Checksumming..."
 
     sum=`/usr/bin/sum $outname`
Then, run the following command:
Code:
patch j2sdk-1_4_2_05-linux-i586.bin < java.patch
That will fix the 'tail' problems and disable the checksum check. Then the install works perfect!
 
Old 09-22-2004, 02:27 PM   #9
maleev
LQ Newbie
 
Registered: Sep 2004
Posts: 1

Rep: Reputation: 0
gotcha

you're the man!
 
Old 09-23-2004, 07:25 AM   #10
bjmurph
LQ Newbie
 
Registered: Sep 2004
Location: Australia
Distribution: Gentoo
Posts: 11

Rep: Reputation: 0
What's wrong with downloading j2sdk-1_4_2_05-linux-i586.bin to your /usr/portage/distfiles, and typing "emerge sun-jdk"?
 
  


Reply



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
emerge --emptytree system problems, gentoo problems!!! alamuru420123 Linux - Distributions 6 10-11-2005 10:48 PM
Problems with Java Web Start (java 1.4.2 - 1.5.0) on Slackware Egy Slackware 11 05-10-2005 06:30 AM
A few problems with Gentoo... SaMe Linux - Laptop and Netbook 5 12-20-2004 04:43 PM
java problems with gentoo....HELP! doralsoral Linux - Software 2 12-12-2004 08:46 AM
JAVA:(jwstric2) Problems in JAVA-LINUX nedian123 Programming 1 06-28-2004 04:12 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions

All times are GMT -5. The time now is 04:26 AM.

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