解决Zookeeper出现Error: Could not find or load main class org.apache.zookeeper.server.quorum.QuorumPeerM

2021-01-18 08:12

阅读:467

标签:path   加载   error   enc   ade   oca   查看   profile   get   

Error: Could not find or load main class org.apache.zookeeper.server.quorum.QuorumPeerMain

1. 安装maven

# 安装
wget http://mirrors.hust.edu.cn/apache/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.tar.gz

  # 解压

 tar -zxvf apache-maven-3.6.3-bin.tar.gz

 # 添加环境变量

 vim /etc/profile

export MAVEN_HOME=/usr/local/maven-3.6.3

export PATH=$PATH:$JAVA_HOME/bin:$MAVEN_HOME/bin

  

  # 重新加载环境变量

 source /etc/profile

 # 查看是否安装成功

 mvn -v

2. 重新编译zookeeper代码即可

cd /usr/local/zookeeper

cd /zookeeper-server
mvn package -Dmaven.test.skip=true
 

 

解决Zookeeper出现Error: Could not find or load main class org.apache.zookeeper.server.quorum.QuorumPeerMain问题

标签:path   加载   error   enc   ade   oca   查看   profile   get   

原文地址:https://www.cnblogs.com/chao666/p/13347669.html


评论


亲,登录后才可以留言!