Tag Archives: java

Gentoo Java emerge issue

Once again portage tells me there is an Oracle Java update and I already know it will have to be downloaded manually and moved into /usr/portage/distfiles. I do this, expecting everything to install without a hitch, but it does not. I get the dreaded “tar: This does not look like a tar archive” (see below) and I have forgot why this happens as usual. The solution is simple, the archive needs to belong to portage:

chown -R portage:portage /usr/portage/distfiles/jdk-7u71-linux-x64.tar.gz

>>> Emerging (1 of 2) dev-java/oracle-jdk-bin-1.7.0.76::gentoo
* jdk-7u76-linux-x64.tar.gz SHA256 SHA512 WHIRLPOOL size ;-) ... [ ok ]
>>> Unpacking source...
>>> Unpacking jdk-7u76-linux-x64.tar.gz to /var/tmp/portage/dev-java/oracle-jdk-bin-1.7.0.76/work
gzip: /var/tmp/portage/dev-java/oracle-jdk-bin-1.7.0.76/distdir/jdk-7u76-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.7.0.76::gentoo failed (unpack phase):
* failure unpacking jdk-7u76-linux-x64.tar.gz
*
* Call stack:
* ebuild.sh, line 93: Called src_unpack
* environment, line 2563: Called default
* phase-functions.sh, line 770: Called default_src_unpack
* phase-functions.sh, line 797: Called __eapi0_src_unpack
* phase-helpers.sh, line 648: Called unpack 'jdk-7u76-linux-x64.tar.gz'
* phase-helpers.sh, line 357: Called __unpack_tar 'gzip -d'
* phase-helpers.sh, line 299: Called __assert_sigpipe_ok 'failure unpacking jdk-7u76-linux-x64.tar.gz'
* isolated-functions.sh, line 39: Called die
* The specific snippet of code:
* [[ $x -ne 0 && $x -ne ${PORTAGE_SIGPIPE_STATUS:-141} ]] && die "$@"
*
* If you need support, post the output of `emerge --info '=dev-java/oracle-jdk-bin-1.7.0.76::gentoo'`,
* the complete build log and the output of `emerge -pqv '=dev-java/oracle-jdk-bin-1.7.0.76::gentoo'`.
* The complete build log is located at '/var/tmp/portage/dev-java/oracle-jdk-bin-1.7.0.76/temp/build.log'.
* The ebuild environment file is located at '/var/tmp/portage/dev-java/oracle-jdk-bin-1.7.0.76/temp/environment'.
* Working directory: '/var/tmp/portage/dev-java/oracle-jdk-bin-1.7.0.76/work'
* S: '/var/tmp/portage/dev-java/oracle-jdk-bin-1.7.0.76/work/jdk1.7.0_76'
>>> Failed to emerge dev-java/oracle-jdk-bin-1.7.0.76, Log file:
>>> '/var/tmp/portage/dev-java/oracle-jdk-bin-1.7.0.76/temp/build.log'
* Messages for package dev-java/oracle-jdk-bin-1.7.0.76:
* ERROR: dev-java/oracle-jdk-bin-1.7.0.76::gentoo failed (unpack phase):
* failure unpacking jdk-7u76-linux-x64.tar.gz