Installing Tomcat on Ubuntu 7.10
Hi Guys
I've tried to install tomcat5.5 on ubuntu 7.10 using Synaptic, I also checked the webadmin feature and the webapps package for tomcat, and installed anything else it prompted me to as dependancies Synaptic goes and downloads whatever it needs, then tries to install and I'm presented with the following error message... Code:
E: tomcat5.5: subprocess post-installation script returned error exit status 1 Please advise me as to what to do here Thanks for your time |
Just to add
I've tried installing on my second ubuntu PC, but getting the same errors |
I too have tried to install Tomcat5.5 on Ubuntu 7.04, with the same result. Looking around the various etc and usr directories, I think Tomcat has indeed been installed, but as the messages indicate, there is a problem with post-installation configuration, meaning the startup script that was written to init.d has errors that make Tomcat fail to start up. It is not listed as a service. So I came here hoping for help in fixing the script. There was some mention of Tomcat5.5 being intended for a java version beyond 1.4, which is what Ubuntu seems to be running, so I am going to check on that part of it - but let me know if you get a fix before I can come back with mine ;-)
|
Okay, here is what I'm seeing:
In /etc/init.d/tomcat5.5, the startup script as I understand, the JAVA_HOME variable is not being set, because the lines: # Look for the right JVM to use for jdir in $JDK_DIRS; do if [ -r "$jdir/bin/java" -a -z "${JAVA_HOME}" ]; then JAVA_HOME_TMP="$jdir" # checks for a real JDK like environment, needed to check if # really the java-gcj-compat-dev package is installed if [ -r "$jdir/bin/jdb" ]; then JAVA_HOME="$JAVA_HOME_TMP" fi fi done export JAVA_HOME do not find a directory in $JDK_DIRS that contains /bin/jdb. For me, the closest value in $JDK_DIRS (which is set near the top of the script) was /usr/lib/jvm/java-gcj . So it looks to me as if the fix is to find the real location of the jdk, as evidenced by the presence of both a /bin/java and a /bin/jdb directory, and put that into $JAVA_HOME in the /etc/default/tomcat5.5 script file. I have looked all through the usual suspects and cannot find a /bin directory with both of those subdirectories, so I'm stuck. Any ideas on where the jdk got installed on Ubu7.04? |
Progress: I have found the right value to give JAVA_HOME in /etc/default/tomcat5.5:
/usr/lib/jvm/java-gcj Let me point out that I am running Eclipse 3.2, and what I did was go into /etc/eclipse/java_home and see what it was running. The top choice was the one above, which I knew from a lot of previous searching actually exists on my machine. Once I put it into the default file, the startup script ran. :-) BUT even though it starts, Tomcat does not show up in the Services box as a service, and it doesn't process a jsp. When I ran /etc/inti.d/tomcat5.5 status, it said Tomcat is not running. |
One more thing: after Tomcat seemed to start but not run, I re-installed sun-6-jdk. Then I found that the /usr/lib/jvm/java-6-sun-1.6.0.00/bin directory contained the mysterious jdb, as well as java and javac; so I made that the JAVA_HOME. That resulted in an error, so on a hunch I took away the bin part, and just made JAVA_HOME=/usr/lib/jvm/java-6-sun-1.6.0.00/
That has resulted in the now-familiar behaviour that tomcat starts ok, but is not running when you go check status. So what does it take to get tomcat to run?? |
Final bit: today, when I booted up, Tomcat started working! Honestly, I don't know why. The only change I made since last entry was to get rid of the gcj java in Eclipse and replace it with java-sun-6. That made ant start working properly. But what made Tomcat start working, or rather, why it didn't start working before, I do not know.
Now I just need to figure out where my connect/J jar file went! |
Just wanted to let you know that if you check ubuntuforums you will find a nice tutorial about installing tomcat. It says that there is a problem with the tomcat available in the synaptics. In that tutorial they show how to install the latest version of tomcat and jre from the binary files available in sun website. Unfortunately I have not bookmarked the address, but a quick search on google should direct you to the tutorial.
|
now it's really working
thanks very much - I chucked the synaptic version and downloaded the official Tomcat one, following directions here:http://ubuntuforums.org/showthread.p...omcat+install:)
|
All times are GMT -5. The time now is 12:53 PM. |