harryg
harryg

Reputation: 24107

Cannot build sbt project due to launcher version

I have a SBT projec on Ubuntu 14.04. When I run sbt I get the following message:

Detected sbt version sbt.version = 0.13.8
Starting sbt: invoke with -help for other options
Cannot find sbt launcher sbt.version = 0.13.8
Please download: 
  From  http://typesafe.artifactoryonline.com/typesafe/ivy-releases/org.scala-sbt/sbt-launch/sbt.version = 0.13.8/sbt-launch.jar
    To  /home/vagrant/.sbt/.lib/sbt.version/sbt-launch.jar

When I try and download from the above url I am met with a 404 response. In fact even the url http://typesafe.artifactoryonline.com is giving 404.

Any ideas how I can get the correct sbt version on my system?

Upvotes: 3

Views: 3328

Answers (3)

Sascha Kolberg
Sascha Kolberg

Reputation: 7162

Your installed sbt version is probably a bit older and still refers to the old repository. Typesafe moved to a bintray repository so the new url would be:

https://dl.bintray.com/typesafe/ivy-releases/org.scala-sbt/sbt-launch/0.13.8/sbt-launch.jar

or with alias

https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/sbt-launch/0.13.8/sbt-launch.jar

repo.typesafe.com may be replaced by repo.lightbend.com in the future ;)

Reinstalling the sbt run script would probably help, too.

Upvotes: 2

Eugene Yokota
Eugene Yokota

Reputation: 95684

How did you install sbt? If you're using sbt-extras you might be hitting #107. Try upgrading it to a newer version.

An alternative is to switch to the official version of sbt. See Installing sbt on Linux:

echo "deb https://dl.bintray.com/sbt/debian /" | sudo tee -a /etc/apt/sources.list.d/sbt.list
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 642AC823
sudo apt-get update
sudo apt-get install sbt

Upvotes: 2

0__
0__

Reputation: 67330

One solution is not to use the package manager at all. Uninstall sbt, and simply use the sbt shell script by Paul Phillips: https://github.com/paulp/sbt-extras :

curl -s https://raw.githubusercontent.com/paulp/sbt-extras/master/sbt > ~/bin/sbt \
  && chmod 0755 ~/bin/sbt

This is quite up-to-date and should have the correct repositories for the launchers.

Upvotes: 3

Related Questions