I'm trying to install Java 8 and Tomcat 9 on a RockyLinux 9 server.
Installing tomcat (from EPEL) requires java-headless >= 1:1.8.0
which is resolved to java-11-openjdk-headless
. So Java 11 gets installed as a dependency... even though I have already installed java-1.8.0-openjdk-headless
and it should, 'logically', provide java-headless >= 1:1.8.0
.
$ yum deplist tomcat
Last metadata expiration check: 1:37:02 ago on Tue 28 Mar 2023 04:13:15 PM CEST.
package: tomcat-1:9.0.65-2.el9.noarch
[...]
dependency: java-headless >= 1:1.8.0
provider: java-11-openjdk-headless-1:11.0.18.0.10-2.el9_1.x86_64
[...]
I guess java-1.8.0-openjdk-headless
lacks the Provides: java-headless
metadata. It is not in the yum whatprovides java-headless
output. But I'm not sure how I can check the full metadata of java-1.8.0-openjdk-headless
.
Is there a way to:
- force yum to ignore the
java-headless
dependency ?
- mark
java-1.8.0-openjdk-headless
as providing this dependency ?
or any other option that would allow me to avoid :
- installing Java 11 for no use
- forcing Java version through
alternatives
or through tomcat configuration ?
EDIT: Java 8 and 11 both get installed without conflict. I would just like to avoid installing Java 11. Tomcat 9 is compatible with Java 8 and runs fine after selecting Java 8 from update-alternatives
.