Ubuntu 17.10 (GNU/Linux 4.13.0-16-generic x86_64)
After installing java with the command:
sudo apt install openjdk-8-jdk-headless
I have java version 8u151
But because of the bug (https://bugs.openjdk.java.net/browse/JDK-8189789) I need to install the previous update of Java 8 u144 or u131 whatever.
To see available versions:
$ apt-cache policy openjdk-8-jdk-headless
openjdk-8-jdk-headless:
Installed: (none)
Candidate: 8u151-b12-0ubuntu0.17.10.2
Version table:
8u151-b12-0ubuntu0.17.10.2 500
500 http://us.archive.ubuntu.com/ubuntu artful-updates/main amd64 Packages
500 http://security.ubuntu.com/ubuntu artful-security/main amd64 Packages
8u144-b01-2 500
500 http://us.archive.ubuntu.com/ubuntu artful/main amd64 Packages
And when I try to install
$ sudo apt install openjdk-8-jdk-headless=8u144-b01-2
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
openjdk-8-jdk-headless : Depends: openjdk-8-jre-headless (= 8u144-b01-2) but 8u151-b12-0ubuntu0.17.10.2 is to be installed
E: Unable to correct problems, you have held broken packages.
Here I stucked.
The question: How to install exact update of OpenJDK 8?
apt list -a openjdk-8-jdk-headless
before to see the available versions. On Ubuntu 20.04, aptitude is not installed by default so use the second option. – angelito Aug 12 '20 at 16:59