[Linux] Zookeeper启动报错 JAVA_HOME is not set and java could not be found in PATH

linux环境确认JAVA_HOME变量已经设置 

./zkServer.sh 启动 zookeeper 报错 JAVA_HOME is not set and java could not be found in PATH

最后在zkEnv.sh中强制加上JAVA_HOME环境变量解决

步骤:

  1.zookeeper bin 目录vim  zkEnv.sh 在下图位置增加JAVA环境变量

   

  2.再次启动zookeeper成功

   

  

  

原文地址:https://www.cnblogs.com/minost/p/13541213.html