Invalid or corrupted sbt-launch-jar file
I am trying to install spark on my MacOSX. I already installed Scala and Sbt using brew. After downloading and expanding spark-1.4.1 (I also tried spark-1.2.1 and spark-1.1.1), I run -
sbt/sbt clean assembly
Every time with the same error:
Invalid or corrupt jarfile sbt/sbt-launch-0.13.5.jar
I have tried the above solutions about changing the name and installing sbt manually, but none of them work. I've seen people asking stackoverflow questions many times and the solution doesn't seem to be consistent. Can anyone help me here?
source to share
Clap. If you look at the contents of this "jar" file, it is actually an HTML 404 document. I'll report a bug.
If you decide to build a distribution, Maven builds are better supported (obviously!). I only use the SBT build to "play" and then I just use my brew -installed SBT, not the one in the bundle (more like it ...).
UPDATE: The build script build/sbt
should download the jar file on demand. I think someone created a tgz file with this fake HTML file without checking it first. I am researching and I will write a bug report.
In the meantime, just uninstall build/sbt-launch-0.13.7.jar
and try again build/sbt
( sbt/sbt
deprecated and just calls build/sbt
).
UPDATE2: Crap, deleting the file doesn't help. I was mistaken that a dummy file is included. I think the urls are bad with which it is trying to read. Stand up ...
FINAL UPDATE: The good news is this bug has been fixed for 1.5. For now, just download it http://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/sbt-launch/0.13.7/sbt-launch.jar
, move it to the directory build
and rename it sbt-launch-0.13.7.jar
. Then it build/sbt
will work.
source to share
In the build / sbt-launch-lib.bash line edit the corresponding line with the following
if [ $(command -v curl) ]; then
(curl --fail --location --silent ${URL1} > ${JAR_DL} ||\
(rm -f "${JAR_DL}" && curl --fail --location --silent ${URL2} ${JAR_DL})) && \
mv "${JAR_DL}" "${JAR}"
elif [ $(command -v wget) ]; then
(wget --quiet ${URL1} -O ${JAR_DL} ||\
(rm -f "${JAR_DL}" && wget --quiet ${URL2} -O ${JAR_DL})) &&\
mv "${JAR_DL}" "${JAR}"
else
Then try again, run sbt build command
sbt/sbt assembly
source to share