我在 Ubuntu 13.04 上安装 Apache Spark 时遇到问题。我使用 spark-0.8.1-incubating,./sbt/sbt update
和 ./sbt/sbt compile
都可以正常工作。但是,当我执行 ./sbt/sbt assembly
时,会出现以下错误:
[info] Set current project to default-289e76 (in build file:/node-insights/server/lib/spark-0.8.1-incubating/sbt/)
[error] Not a valid command: assembly
[error] Not a valid project ID: assembly
[error] Not a valid configuration: assembly
[error] Not a valid key: assembly
[error] assembly
[error]
我搜索了与此相关的东西,但找不到任何有用的东西。任何指导将不胜感激。
最佳答案
current project set to default-289e76
消息表明 sbt
是从 Spark 源目录之外调用的:
$ /tmp ./spark-0.8.1-incubating/sbt/sbt assembly
[info] Loading global plugins from /Users/joshrosen/.dotfiles/.sbt/plugins/project
[info] Loading global plugins from /Users/joshrosen/.dotfiles/.sbt/plugins
[info] Set current project to default-d0f036 (in build file:/private/tmp/)
[error] Not a valid command: assembly
[error] Not a valid project ID: assembly
[error] Not a valid configuration: assembly
[error] Not a valid key: assembly
[error] assembly
[error] ^
在 spark-0.8.1-incubating
目录中运行 ./sbt/sbt assembly
工作正常(注意日志输出显示当前项目设置正确) :
$ spark-0.8.1-incubating sbt/sbt assembly
[info] Loading global plugins from /Users/joshrosen/.dotfiles/.sbt/plugins/project
[info] Loading global plugins from /Users/joshrosen/.dotfiles/.sbt/plugins
[info] Loading project definition from /private/tmp/spark-0.8.1-incubating/project/project
[info] Loading project definition from /private/tmp/spark-0.8.1-incubating/project
[info] Set current project to root (in build file:/private/tmp/spark-0.8.1-incubating/)
...
关于scala - Apache Spark 项目的 "./sbt/sbt assembly"错误 "Not a valid command: assembly",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21245669/