![无法在 ubuntu 14.04 中安装 solr tomcat](https://linux22.com/image/994149/%E6%97%A0%E6%B3%95%E5%9C%A8%20ubuntu%2014.04%20%E4%B8%AD%E5%AE%89%E8%A3%85%20solr%20tomcat.png)
我正在尝试使用 Syanaptic 包管理器安装 solr tomcat。我收到以下错误:
Unpacking solr-tomcat (3.6.2+dfsg-2) ...
Setting up solr-tomcat (3.6.2+dfsg-2) ...
* no JDK found - please set JAVA_HOME
dpkg: error processing package solr-tomcat (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
solr-tomcat
E: Sub-process /usr/bin/dpkg returned an error code (1)
A package failed to install. Trying to recover:
Setting up solr-tomcat (3.6.2+dfsg-2) ...
* no JDK found - please set JAVA_HOME
dpkg: error processing package solr-tomcat (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
solr-tomcat
我已经设置了JAVA_HOME。
sharun@sharun-VirtualBox:~$ echo $JAVA_HOME
/usr/lib/jvm/java-8-oracle
sharun@sharun-VirtualBox:~$
我错过了什么?
我在虚拟盒中使用 ubuntu 14.04。
答案1
这个答案为我解决了这个问题。
从航站楼:
sudo gedit /etc/default/tomcat7 Find commented JAVA_HOME, uncomment and change the directory to your JDK environment.