简体   繁体   中英

why run sbt with “ ./ ” prefix? it doesn't work

I'm trying to install Kafka and the docs says to do:

> tar xzf kafka-<VERSION>.tgz
> cd kafka-<VERSION>
> ./sbt update
> ./sbt package
> ./sbt assembly-package-dependency

So, when I try to run ./sbt update I get this error:

root@kfk1:~/kafka-0.8.1.1-src# ./sbt
-bash: ./sbt: No such file or directory

But if I try without " ./ ", it seems to work:

root@kfk1:~/kafka-0.8.1.1-src# sbt update
Getting org.scala-sbt sbt 0.13.5 ...
  • Use this prefix is a must? Why?
  • If I don't use, the executed command is the same?

Check that the file sbt exists and has execute permissions.

./ means to look in the current directory for the script.

. == current directory .. == parent directory

By the way, Kafka 0.8.1.1 use gradle, and not sbt. That's why you don't have the sbt file in your directory.

不需要./sbt所有kafka的jar文件都在lib文件夹中

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM