我遇到了同样的问题,现在已经解决了。
这可能是因为sbt-launch-0.13.7.jar下载失败,虽然你可以看到文件存在,但它不是正确的文件。该文件大小约为
1.2MB。如果小于此大小,您可以进入build/目录,使用"vim sbt-launch-0.13.7.jar"或其他工具来
打开sbt-launch-0.13.7.jar文件。
如果文件内容如下:
<html>
<head><title>404 Not Found</title></head>
<body bgcolor="white">
<center><h1>404 Not Found</h1></center>
<hr><center>nginx</center>
</body>
</html>
这意味着sbt-launch-0.13.7.jar未被下载。然后在同一目录下打开sbt-launch-lib.bash,在第41和42行检查,它给出了两个URL。打开它们以检查是否正常工作。
如果url1不起作用,则手动下载sbt-launch.jar(您可以使用url2,它可能有效,或者您可以从sbt官方网站下载),将其放在相同的目录中,将其重命名为sbt-launch-0.13.7.jar,然后应该注释掉与下载相关的行(可能在47到68行之间),避免脚本再次下载。就像这样:
acquire_sbt_jar () {
SBT_VERSION=`awk -F "=" '/sbt\.version/ {print $2}' ./project/build.properties`
URL1=http://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/sbt-launch/${SBT_VERSION}/sbt-launch.jar
URL2=http://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/sbt-launch/${SBT_VERSION}/sbt-launch.jar
JAR=build/sbt-launch-${SBT_VERSION}.jar
sbt_jar=$JAR
}
然后使用 "build/sbt assembly" 重新构建 Spark。
希望你能成功。
如果我表达不清楚,下面的链接可能会有帮助。
https://www.mail-archive.com/user@spark.apache.org/msg34358.html
错误:无效或损坏的jar文件sbt/sbt-launch-0.13.5.jar prabeesh提供的答案
https://groups.google.com/forum/#!topic/predictionio-user/fllCh8n-0d4