bengreen.eu Circle Device

 

Quick Reference

Gentoo Java 8u11 Installation Problems

I downloaded the Java 8 files from Oracle, as instructed, and placed them in the /usr/portage/distfiles/ directory. All is well and portage detects that the file is present as you can see from this directory listing:

-rw-rw-r--   1 portage portage  7.3K Apr 17  2009 java-config-wrapper-0.16.tar.bz2
-rw-r--r--   1 root    root      69M Dec 21  2012 jdk-6u37-linux-x64.bin
-rw-r--r--   1 root    root      92M Dec 21  2012 jdk-7u10-linux-x64.tar.gz
-rwx------   1 root    root     152M Jul 30 08:39 jdk-8u11-linux-x64.tar.gz
-rw-rw-r--   1 portage portage  1.7M Dec  6  2012 kbd-1.15.5.tar.gz

When I emerge the package oracle-jdk-bin I get this error:

>>> Emerging (1 of 1) dev-java/oracle-jdk-bin-1.8.0.11
 * jdk-8u11-linux-x64.tar.gz SHA256 SHA512 WHIRLPOOL size ;-) ...  [ ok ]
>>> Unpacking source...
>>> Unpacking jdk-8u11-linux-x64.tar.gz to /var/tmp/portage/dev-java/oracle-jdk-bin-1.8.0.11/work
gzip: /var/tmp/portage/dev-java/oracle-jdk-bin-1.8.0.11/distdir/jdk-8u11-linux-x64.tar.gz: Permission denied
tar: This does not look like a tar archive
tar: Exiting with failure status due to previous errors
 * ERROR: dev-java/oracle-jdk-bin-1.8.0.11::gentoo failed (unpack phase):
 *   failure unpacking jdk-8u11-linux-x64.tar.gz

You may notice that the file owner for all the files is portage except for the files I downloaded. This seems to be the problem as it carries through to the extracted location:

# ls -lah /var/tmp/portage/dev-java/oracle-jdk-bin-1.8.0.11/
drwxrwxr-x 6 portage portage 4.0K Jul 30 09:04 .
drwxrwxr-x 3 portage portage 4.0K Jul 30 09:04 ..
-rw-r--r-- 1 portage portage    0 Jul 30 09:04 .die_hooks
drwxr-xr-x 2 root    portage 4.0K Jul 30 09:04 distdir
drwxrwxr-x 2 portage portage 4.0K Jul 30 09:04 homedir
prwxrwx--- 1 root    portage    0 Jul 30 09:04 .ipc_in
prwxrwx--- 1 root    portage    0 Jul 30 09:04 .ipc_out
-rw-r--r-- 1 root    root       0 Jul 30 09:04 .setuped
drwxrwxr-x 3 portage portage 4.0K Jul 30 09:04 temp
drwx------ 2 portage portage 4.0K Jul 30 09:04 work

Once I change the ownership of this file to portage:portage the emerge seems to complete successfully:

>>> Emerging (1 of 1) dev-java/oracle-jdk-bin-1.8.0.11
 * jdk-8u11-linux-x64.tar.gz SHA256 SHA512 WHIRLPOOL size ;-) ...  [ ok ]
>>> Unpacking source...
>>> Unpacking jdk-8u11-linux-x64.tar.gz to /var/tmp/portage/dev-java/oracle-jdk-bin-1.8.0.11/work
>>> Source unpacked in /var/tmp/portage/dev-java/oracle-jdk-bin-1.8.0.11/work
>>> Preparing source in /var/tmp/portage/dev-java/oracle-jdk-bin-1.8.0.11/work/jdk ...
>>> Source prepared.

I hope this helps someone as it was a little confusing to me for a short while

Quick Links: Techie Stuff | General | Personal | Quick Reference