1

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.

3 Answers 3

3
+100

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):

Make sure to match the version of the -compat package to the SDK you've installed in the first step. The -compat RPM requires that the RPM self-extracting file from Sun be used in the previous step, not the plain (non-RPM) one.

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.

4
  • Hi - this seems to have gotten me closer, but not much. I can now get the compat rpm for Java1.6.0.3 to install, but I can't seem to get anything else. Everything now starts to whine that the GCJ 1.4 compat libaries are not there. I don't have GCJ1.4 and I don't have any interest in GCJ, I want Java 6 and Tomcat 6! Any idea what I'm doing wrong?
    – Bart B
    Feb 10, 2010 at 21:14
  • @Bart: Are you trying to install via yum or by manual download of the package from JPackage?
    – Zypher
    Feb 11, 2010 at 20:15
  • Via yum. I un-installed all Java RPMs, then installed the JPackage util, then the 1.6.0.3 self-extracting RPM from Sun, then the compat lib, and then after all that I tried: yum install tomcat6 And got an error that GCJ's compat can't be installed. I do not have GCJ (and really don't want it either)
    – Bart B
    Feb 11, 2010 at 20:51
  • I accepted this answer so that the bounty reputation doesn't go to waste, and it did get me one step closer, but ultimately I still couldn't get JPackage to actually work.
    – Bart B
    Feb 15, 2010 at 19:53
1

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 via sh mypostinstall.sh to correctly set up alternatives for java and javac.

0

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .