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