Summary: | Java (J2SDK) install fails with error about the file being corrupted | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Russ Tennant <russ> |
Component: | [OLD] Development | Assignee: | Java team <java> |
Status: | RESOLVED UPSTREAM | ||
Severity: | normal | CC: | axxo |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | x86 | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Russ Tennant
2004-07-20 08:35:00 UTC
Why install it directly? when we have an ebuild that should always work emerge sun-jdk We do use the ebuilds for jdk on some machines, but most installations are handled manually. It is easier for us to maintain a few java applications ourselves than to try and maintain updates to the jdk, tomcat, jython, etc. Traditionally the tomcat, jython, and jdk ebuilds have not worked for us for one reason or another. It just isn't worth the hassle to try and maintain our software with the ebuilds at this point. In the future, that will probably change but now it isn't a possibility. For this particular instance, I needed to install the newest version (1.4.2_05) of the jdk for testing (we need a bugfix in 1.4.2_05) and there isn't an ebuild for that anyway. Also, I do not think the jdk ebuilds are setup for me to install multiple micro versions (jdk 1.4.0, 1.4.1, and 1.4.2) at the same time. Which is something that we require also. Whats wrong with ebuilds to maintain software? you can have your own set. and submit them to us I know the tomcat,etc ebuilds need some work, but you could help us fix them.. If you make a bug about the jdk bugfix i'm sure we can include it in our ebuilds Well, this isn't a java bug then, reassigning it back In the long run, we plan to use the ebuilds to maintain all the software. It is just taking time to get there and of course we will post any improvements we come up with to bugzilla. I agree w/ you. I don't think this is a problem with the java portion of Gentoo. I think coreutils may be broken or the java installer may be broken. I'm leaning toward coreutils since it used to work with a previous version. I'm using J2RE instead of J2SDK, and the proposed solution to this bug ("use ebuilds, not direct downloads from Sun") doesn't apply in this case, so I'm adding these comments: > emerge -s sun-jre-bin * dev-java/sun-jre-bin Latest version available: 1.4.2.05 Latest version installed: 1.4.2.04 Size of downloaded files: 14,044 kB Homepage: http://java.sun.com/j2se/1.4.2/ Description: Sun's J2SE Platform License: sun-bcla-java-vm > emerge sun-jre-bin >>> emerge (1 of 1) dev-java/sun-jre-bin-1.4.2.05 to / !!! j2re-1_4_2_05-linux-i586.bin not found in /usr/portage/distfiles. !!! dev-java/sun-jre-bin-1.4.2.05 has fetch restriction turned on. !!! This probably means that this ebuild's files must be downloaded !!! manually. See the comments in the ebuild for more information. * Please download j2re-1_4_2_05-linux-i586.bin from: * http://javashoplm.sun.com/ECom/docs/Welcome.jsp?StoreId=22&PartDetailId=j2re-1.4.2_05-oth-JPR&SiteId=JSC&TransactionId=noreg * (select the "Linux self-extracting file" package format of the JRE * and move it to /usr/portage/distfiles ------------------------- So, I manually download j2re-1_4_2_05-linux-i586.bin, run the program, agree to the license, and then get this: Do you agree to the above license terms? [yes or no] yes tail: `-1' option is obsolete; use `-n 1' since this will be removed in the future Unpacking... tail: cannot open `+479' 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. ------------------------------------------------- The solution is simple: the reference to "tail -1" (line 326) should be changed to "tail -n 1" and the reference to "tail +479" (line 334) should be changed to "tail -n +479". The J2RE archive will then run and install correctly. (I suspect the additional problem the original poster had was that his text editor rather unhelpfully added a newline to the end of .bin file when he edited it (just like mine did, which messed up the checksumming process until I removed the extraneous newline)) How this can be fixed within the context of the ebuild system, though, I'm not sure. I'm sure there was a good reason that the old "tail -N" and "tail +N" syntax was deprecated, then removed from /usr/bin/tail, but until other vendors like Sun start using the new syntax, does the +/- syntax need to be reinserted into "tail" in coreutils? That's correct I used vim. Running the following solved the checksum problem. sed -i -e "s/tail/tail -n/g" j2sdk-1_4_2_05-linux-i586.bin I'll go ahead and submit a bug report with Sun. Hmmmmm. I missed a critical line in the ebuild instructions - after I downloaded the j2re-1_4_2_05-linux-i586.bin, I was supposed to put it in /usr/portage/distfiles and rerun "emerge sun-jre-bin" rather than manually install it. And it looks like ebuild system must use a different way to extract/install the files, since it didn't complain about "tail" syntax incompatibilties. So... maybe all's well in the world after all. Except for those who want to manually install Java or for whatever reason need the old +/- syntax in "tail". But whether or not this bug gets addressed by the coreutils folks or just closed, at least my J2RE is now installed. (oh, I've put in a bug report with Sun already, but feel free to double-up) well, not using -n was deprecated ages ago, sun needs to fix there installer, marking it upstream, use the ebuild :) This is fixed in java 2 sdk 1.5 beta 2. http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4980600 Workaround from bug report: "export _POSIX2_VERSION=199209" before running the installer. I verified the workaround does work on the Gentoo machines I was observing the problem on. |