Cent OS 7 (EOL) how to install Java 1:11.0.0 for 4.8

1st off, I love CentOS but I am original Mac/PC user so I only use Unix on a few servers. Still very much learning each time I deploy or use it.

I know I need to replace CentOS and going with Rocky but until that new deployment I need Openfire to work.
Trying to update to 4.8 and I get this message:

What am I missing?

I’m not a CentOS user, and I can’t advise you on how to correct this problem, but the cause is this: your system has Java 1.8 (or: 8) installed, but Openfire requires Java 11 (or later).

Java 11 is available directly from the CentOS update repository; the packages will all start with “java-11”.

You should be able to install it in parallel with Java 8. You can then either use the alternatives system or override JAVA_HOME in /etc/sysconfig/openfire to use the Java 11 JVM.

Note that the “provides” entries for the new packages will include “java-11” but not “java”, which the openfire rpm will be looking for.

Use the “–nodeps” parameter with rpm when upgrading openfire to bypass the depency check.

Thanks Nels! Do you have a suggestion as how we can generically improve the Openfire packaging to make this easier for CentOS users?

Maybe! Boolean dependencies were introduced with RPM version 4.13, so at least for RHEL family 8+ releases (including RHEL, CentOS Stream, AlmaLinux, Rocky, Oracle) you could do something like this in the specfile:

Requires: (java >= 1:11.0.0 or java-11 or java-17 or java-21)

That wouldn’t work for CentOS 7 which only has rpm 4.11.x. Not sure if the boolean syntax would break that version entirely, or if --nodeps would still allow bypassing the dependency check.

It’s a bit moot with the impending EoS for CentOS 7. Probably worth checking on how this might affect other rpm-based distros like SUSE, etc. though I expect nearly anything still supported would be on at least rpm 4.13 by now.

1 Like