solr版本是6.0.0 我跑的时候
>bin/solr -e example
错误
Java not found, or an error was encountered when running java.
A working Java 8 is required to run Solr!
Please install Java 8 or fix JAVA_HOME before running this script.
Command that we tried: 'java -version'
Active Path:
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
我的java版本是
java version "1.8.0_91"
Java(TM) SE Runtime Environment (build 1.8.0_91-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.91-b14, mixed mode)
我的PATH是
/opt/java/bin:/opt/java/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
答案 0 :(得分:1)
我编辑bin / solr
116 JAVA=java
到
116 JAVA=/opt/java/bin/java
然后它有效!
答案 1 :(得分:0)
在5.5中遇到类似的问题,这个链接帮助了我:https://www.garysieling.com/blog/install-solr-ubuntu