I tried to install Java 9, but this version was removed from Oracle servers and cannot be downloaded by apt
. Now whenever I run apt to upgrade my system, apt is complaining about not being able to download Java 9. How do I fix this behaviour? I don't want to install Java 9 and don't want to see that annoying message of apt.
When I run 'apt autoremove' I got (truncated output):
....
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for gnome-menus (3.13.3-6ubuntu3.1) ...
Processing triggers for desktop-file-utils (0.22+linuxmint1) ...
Processing triggers for mime-support (3.59ubuntu1) ...
Processing triggers for hicolor-icon-theme (0.15-0ubuntu1) ...
Setting up oracle-java9-installer (9.0.4-1) ...
No /var/cache/oracle-jdk9-installer/wgetrc file found.
Creating /var/cache/oracle-jdk9-installer/wgetrc and
using default oracle-java9-installer wgetrc settings for it.
Downloading Oracle Java 9...
$ apt-cache policy oracle-java9-installer
oracle-java9-installer:
Installed: 9.0.4-1
Candidate: 9.0.4-1
Version table:
*** 9.0.4-1 500
500 http://ppa.launchpad.net/linuxuprising/java/ubuntu xenial/main amd64 Packages
100 /var/lib/dpkg/status
Apt's list of packages includes a notation of whether a package should be installed (install) or not (remove).
This notation is persistent: If a package is marked install, apt will keep trying to install the package until apt succeeds.
Use the
apt-mark
command to change the list entry.In this case, try
sudo apt-mark remove oracle-java9-installer