我尝试在the official guide之后从头开始安装RocketMQ,我使用了jdk 1.8.0_121和maven 3.5.0。

但是,在步骤mvn -Prelease-all -DskipTests clean install -U之后,没有生成目录distribution,因此cd distribution/target/apache-rocketmq将不会成功。

然后,我尝试通过键入sh bin/mqnamesrv直接启动名称服务器,这给了我以下错误。

Java HotSpot(TM) 64-Bit Server VM warning: ignoring option PermSize=128m; support was removed in 8.0
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=320m; support was removed in 8.0
Java HotSpot(TM) 64-Bit Server VM warning: Using the DefNew young collector with the CMS collector is deprecated and will likely be removed in a future release
Java HotSpot(TM) 64-Bit Server VM warning: UseCMSCompactAtFullCollection is deprecated and will likely be removed in a future release.
Error: Could not find or load main class org.apache.rocketmq.namesrv.NamesrvStartup


我曾以为这可能是我的CLASSPATH环境变量的问题,但是即使设置了它也仍然无法正常工作。下面是我的配置

export JAVA_HOME=$HOME/src/jdk1.8.0_121
export PATH=$PATH:$JAVA_HOME/bin
export MAVEN_HOME=$HOME/src/apache-maven-3.5.0
export PATH=$PATH:$MAVEN_HOME/bin
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar


我是否想知道是否遗漏了源代码的任何更新或文档中未出现的某些额外步骤?

最佳答案

抱歉给您带来麻烦,请git在develop分支中克隆最新的源代码,并且有一个独立的模块distribution

如果您在cd target/apache-rocketmq-all/分支中,请运行master来运行rocketmq。

09-26 08:40