Kafka 0.9.0.1: Could not find or load main class o

2019-07-27 19:31发布

问题:

I am this official Kafka tutorial to install and test kafka on Ubuntu. First, I downloaded Kafka 0.9.0.1 from here: http://ftp.cixug.es/apache/kafka/0.9.0.1/kafka-0.9.0.1-src.tgz

Then, from kafka-0.9.0.1-src, I runned this command:

bin/zookeeper-server-start.sh config/zookeeper.properties

and got the following error message:

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

Maybe the problem is that I upgraded my Kafka from 0.8 to 0.9.0.1, and I have previously installed ZooKeeper using sudo apt-get install zookeeperd. To remove previous version of Kafka, I just deleted a directory with an old version using rm -rf kafka-0.8. Should I uninstall/install something else to be able to use Kaka-0-9-0-1?

回答1:

You've downloaded the source package. Download the binary package of Kafka and do testing.