0

I am trying to install JDK 8 or 9, can't get either to work, so that I can use my laptop for my Java class. When I try to install it I get an error to install. This is what I have done so far:

sudo add-apt-repository -y ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java9-installer

and I get an error:

download failed
Oracle JDK 9 is NOT installed.
dpkg: error processing package oracle-java9-installer (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
oracle-java9-installer
E: Sub-process /usr/bin/dpkg returned an error code (1)

I've tried everything that I could find to remedy this but it all looked to be the same. This happens with version 8 or 9. Once I get this going I plan to install jGrasp since that is what I am familiar with and don't plan on any major programming.

Chai T. Rex
  • 5,126
  • 1
  • 24
  • 48
boostless
  • 1
  • 1
  • 1
    Possible duplicate of [How do I install openjdk 7 on Ubuntu 16.04 or higher?](https://askubuntu.com/questions/761127/how-do-i-install-openjdk-7-on-ubuntu-16-04-or-higher) – user68186 Jan 20 '18 at 20:08
  • 1
    Possible duplicate of [Can't install Oracle Java 8 in Ubuntu 16.04](https://askubuntu.com/questions/966107/cant-install-oracle-java-8-in-ubuntu-16-04). Notably, WebUpd8's Oracle Java package is out-of-date and contains a link to an old version Oracle doesn't provide anymore. They need to update their package. – Chai T. Rex Jan 20 '18 at 20:26
  • To properly format terminal output, paste the text, select the text with your mouse, and press the `{}` button in the editor. – Chai T. Rex Jan 20 '18 at 20:27
  • I am new at this and I don't understand how to enter the command on this one: https://askubuntu.com/a/958284/785351 – boostless Jan 21 '18 at 02:35
  • 2
    Possible duplicate of [Cannot install JDK 9 via apt](https://askubuntu.com/questions/996774/cannot-install-jdk-9-via-apt) – karel Jan 21 '18 at 12:56

1 Answers1

0
sudo apt-get purge oracle-java9-installer

solved my issue. Later I also changed Ubuntu Software center server to "Main Server".

omid abbasi
  • 431
  • 3
  • 14