Error: JAVA_HOME is not set and java could not be found in PATH.和bash: zkServer.sh: 未找到命令...
首先安装zookeeper之后,要设置环境变量。在zookeeper文件夹中的bin目录下。
·
运行sudo /opt/zookeeper/bin/zkServer.sh start时,报错如下:
启动zookeeper,java未找到:
错误1:Error: JAVA_HOME is not set and java could not be found in PATH.
错误2:bash: zkServer.sh: 未找到命令...:
解决办法:
首先安装zookeeper之后,要设置环境变量
sudo vi /etc/profile
#zookeeper
export ZK_HOME=/opt/zookeeper
export PATH=$PATH:$ZK_HOME/bin
在zookeeper文件夹中的bin目录下
cd /opt/zookeeper/bin
ll
sudo vi zkEnv.sh
JAVA_HOME="/usr/local/java"
更多推荐
已为社区贡献1条内容
所有评论(0)