简体   繁体   中英

A working Java 8 is required to run Solr?

solr version is 6.0.0 When I run

>bin/solr -e example

error with

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

my java version is

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)

and my PATH is

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

I edit the bin/solr

116     JAVA=java

to

116     JAVA=/opt/java/bin/java

then it works!

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM