1

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
1
  • 1
    Before running solr, try export JAVA_HOME=/opt/java Commented May 9, 2016 at 20:14

2 Answers 2

2

I edit the bin/solr

116     JAVA=java

to

116     JAVA=/opt/java/bin/java

then it works!

0

Ran into a similar issue on 5.5, this link helped me: https://www.garysieling.com/blog/install-solr-ubuntu

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.