3

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?

0__
  • 66,707
  • 21
  • 171
  • 266
harryg
  • 23,311
  • 45
  • 125
  • 198
  • Does this help: https://stackoverflow.com/questions/13711395/install-sbt-on-ubuntu ? – 0__ Mar 26 '16 at 10:49
  • No, I came across this already. The instructions are clear - download the jar and save it in the specified dir - but the server hosting the jar seems to not be working. I.e. it is returning 404 for all requests – harryg Mar 26 '16 at 10:59

3 Answers3

3

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.

0__
  • 66,707
  • 21
  • 171
  • 266
2

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.

akku
  • 76
  • 1
  • 7
Sascha Kolberg
  • 7,092
  • 1
  • 31
  • 37
2

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
Eugene Yokota
  • 94,654
  • 45
  • 215
  • 319