运行solr需要一个工作的java8?

m1m5dgzv  于 2021-07-03  发布在  Java
关注(0)|答案(2)|浏览(289)

当我运行时,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)

我的道路是

/opt/java/bin:/opt/java/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
vngu2lb8

vngu2lb81#

我编辑bin/solr

116     JAVA=java

116     JAVA=/opt/java/bin/java

那就行了!

anhgbhbe

anhgbhbe2#

在5.5上遇到类似问题,此链接帮助我:https://www.garysieling.com/blog/install-solr-ubuntu

相关问题