I'm looking to get Tomcat6 on CentOS 5 in an entirely RPM-based way. JPackage seems to be a great option for this, so I've added the repo and now I'm trying to get it to work.
The instructions say to install the RPM-based JDK download from Sun, so I did that. Then the instructions say to install the appropriate -compat library from JPackage. At this point I get the following error:
[root@localhost bart]# rpm -ivh java-1.6.0-sun-compat-1.6.0.03-1jpp.i586.rpm
error: Failed dependencies:
jdk = 2000:1.6.0_03-fcs is needed by java-1.6.0-sun-compat-1.6.0.03-1jpp.i586
jpackage-utils >= 0:1.7.3 is needed by java-1.6.0-sun-compat-1.6.0.03-1jpp.i586
[root@localhost bart]#
What confuses me in particular is that it seems to be looking for the fedora version of the Sun JVM. The JPAckage instructions do warn that it is vital to use the RPM-based download, so I have been sure to do this.
In case it helps, here is my Java version:
[root@localhost bart]# java -version
java version "1.6.0_18"
Java(TM) SE Runtime Environment (build 1.6.0_18-b07)
Java HotSpot(TM) Server VM (build 16.0-b13, mixed mode)
[root@localhost bart]#
Any ideas what I've missed or done wrong?
Thanks,
Bart.
You are trying to install a compat library for a different version of the JDK than you have install from Sun.
You are trying to install
compat-1.6.0.03
which would match up to JDK 1.6.0_03.Your java version is 1.6.0_18. You can get 1.6.0_03 here
It looks like they haven't updated the compat libraries since U3 (1.6.0_03)
This gem is a little hidden in thier instructions (emphasis mine):
I would suggestion uninstalling the 1.6.0_18 jdk, and installing the 1.6.0_03 jdk. That should get you where you need to go.
In addition to Zypher's answer that you need the correct
-compat
rpm matching your installed JVM, it appears that rpm is reminding you that you also need to install the jpackage-utils rpm of an appropriate version.I would also warn you that the postinstall scriptlet sometimes fail to execute correctly in attempting to set up alternatives (I believe there is a typo). You should be able to extract the scriptlet via
rpm -q --scripts <rpm package name>
, put the postinstall contents in a .sh file, fix the typos, then execute the fixed script viash mypostinstall.sh
to correctly set up alternatives for java and javac.I just love irony. Having given up on JPackage I went to look for good instructions to install Tomcat6 manually and have it run as an unprivileged user and have good startup scripts. What did I find instead? The solution to getting Tomcat6 to install on Centos5 with JPackage!
The key is this 3rd party compat library that fixes what ever strange issue CentOS 5 has with JPackage: http://plone.lucidsolutions.co.nz/linux/centos/jpackage-jpackage-utils-compatibility-for-centos-5.x
For completeness, I found the instructions here: http://wavded.tumblr.com/post/258713913/installing-tomcat-6-on-centos-5
Bart.