If I run
sudo apt-get install tomcat8
I am getting:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
libtcnative-1 tomcat8-admin tomcat8-docs tomcat8-examples tomcat8-user
The following NEW packages will be installed:
tomcat8
0 upgraded, 1 newly installed, 0 to remove and 161 not upgraded.
Need to get 0 B/41,9 kB of archives.
After this operation, 306 kB of additional disk space will be used.
Preconfiguring packages ...
Selecting previously unselected package tomcat8.
(Reading database ... 403872 files and directories currently installed.)
Preparing to unpack .../tomcat8_8.0.32-1ubuntu1.2_all.deb ...
Unpacking tomcat8 (8.0.32-1ubuntu1.2) ...
Processing triggers for systemd (229-4ubuntu10) ...
Processing triggers for ureadahead (0.100.0-19) ...
Setting up tomcat8 (8.0.32-1ubuntu1.2) ...
Job for tomcat8.service failed because the control process exited with error code. See "systemctl status tomcat8.service" and "journalctl -xe" for details.
invoke-rc.d: initscript tomcat8, action "start" failed.
dpkg: error processing package tomcat8 (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
tomcat8
E: Sub-process /usr/bin/dpkg returned an error code (1)
No idea what the problem is - any ideas?
How to fix following error:
Set JAVA_HOME -> e.g. JAVA_HOME=/usr/lib/jvm/java-8-oracle
In my case:
If you do not have a clue about the JAVA_HOME constant:
Thanks to @alexislucena @https://gist.github.com/alexislucena/89a046dc747123faf4496fb946c1fe79
The problem for me was that I replaced the openJDK that came with LinuxMint with the official JDK from oracle (installed new java jdk) and obviously tomcat is configured to use the default JDK - so the solution is to configure tomcat to use the new jdk.