Oracle JDK8 – ArchLinux fails to upgrade

Hello everybody! Here my experience about the latest version of Oracle JDK8 upgrade: jdk8-8u231-linux-x64.tar.gz

Everybody with ArchLinux know that Oracle JDK upgrade is not possible just using pacman, because Oracle ask for authentication since a while. So, I downloaded the right version for my device from Oracle JDK official.

To install the updated package I downloaded in ~/Downloads the AUR package jdk8.tar.gz. So, I did the untar:

tar xvf jdk8.tar.gz

Then cd into the just created directory and check PKGBUILD file. So proceed with the installation:

cd ./jdk8
makepkg -si

At this point a problem raised up to my terminal:

[[email protected] jdk8]$ makepkg -si
==> Making package: jdk8 8u231-1 (Mon 21 Oct 2019 11:13:52 AM CEST)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Found jce_policy-8.zip
  -> Downloading jdk-8u231-linux-x64.tar.gz...
The source file for this package needs to be downloaded manually
since it requires a login and is not redistributable.
Please visit
  https://www.oracle.com/technetwork/java/javase/downloads/
  Java SE ... JDK, Download v
and download
 jdk-8u231-linux-x64.tar.gz
to your Downloads folder (XDG_DOWNLOAD_DIR) or in with the PKGBUILD.

Usually there is problems with my ~/Downloads directory, this time I did not found my mistake. So, looking better at the PKGBUILD I found it takes the source file using xdg-user-dirs. I have never setup my XDG directories!

To setup the XDG user directories follow the official XDG Wiki.

NB: if even in this way the installation fails, try to change the PKGBUILD file at the line 63 as follow (delete the slash):

-  if [ -s "${XDG_DOWNLOAD_DIR}/${_srcfil}" ] && [ ! -e "${_srcfil}" ]; then
+  if [ -s "${XDG_DOWNLOAD_DIR}${_srcfil}" ] && [ ! -e "${_srcfil}" ]; then

I hope my experience could help others! GWH!!!

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

About Daniele Dalla Torre

I'm a Civil Engineering but I love to learn everything about technology, from the basics to the new frontiers! Here my gpg public key!

Leave a Reply

Your email address will not be published.