Java教程

zookeeper启动异常Error: JAVA_HOME is not set and java could not be found in PATH

本文主要是介绍zookeeper启动异常Error: JAVA_HOME is not set and java could not be found in PATH,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!

明明正常配置了JAVA_HOME,仍然报错:

hadoop@hadoop-1:/data/apache-zookeeper-3.7.1-bin/bin$ sh zkServer.sh start
zkServer.sh: 78: /data/apache-zookeeper-3.7.1-bin/bin/zkEnv.sh: [[: not found
-p: not found
java is /data/hadoop/jdk1.8.0_202/bin/java
Error: JAVA_HOME is not set and java could not be found in PATH.

解决办法:

换成./zkServer.sh start

或bash zkServer.sh start

这篇关于zookeeper启动异常Error: JAVA_HOME is not set and java could not be found in PATH的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!