Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Install Scala and SBT using apt-get on Ubuntu 14.04 or any Debian derivative using apt-get
sudo apt-get remove scala-library scala
sudo wget www.scala-lang.org/files/archive/scala-2.10.4.deb
sudo dpkg -i scala-2.10.4.deb
sudo apt-get update
sudo apt-get install scala
wget http://scalasbt.artifactoryonline.com/scalasbt/sbt-native-packages/org/scala-sbt/sbt/0.12.4/sbt.deb
sudo dpkg -i sbt.deb
sudo apt-get update
sudo apt-get install sbt
@ghost

This comment has been minimized.

Copy link

@ghost ghost commented Dec 21, 2014

This works great, thanks for the post!
To install with the latest versions of scala/sbt I changed the following lines:
...
2: sudo wget www.scala-lang.org/files/archive/scala-2.11.4.deb
...
6: sudo wget https://bintray.com/artifact/download/sbt/debian/sbt-0.13.6.deb
7: sudo dpkg -i sbt-0.13.6.deb
...

@ehsun7b

This comment has been minimized.

Copy link

@ehsun7b ehsun7b commented Feb 26, 2015

Works!

I changed to sudo wget www.scala-lang.org/files/archive/scala-2.11.5.deb
....
and
...
wget http://scalasbt.artifactoryonline.com/scalasbt/sbt-native-packages/org/scala-sbt/sbt/0.13.0/sbt.deb

... and before sudo dpkg -i sbt.deb I had to install curl by sudo apt-get install curl

@mbonaci

This comment has been minimized.

Copy link

@mbonaci mbonaci commented Mar 28, 2015

Nice, but I don't quite understand why would you need the following lines:

sudo apt-get update
sudo apt-get install scala

sudo apt-get update
sudo apt-get install sbt
@orsonadams

This comment has been minimized.

Copy link

@orsonadams orsonadams commented Apr 8, 2015

Works great! just use the updated packages and you dont need sudo apt-get install as was mentioned already.

@nmadhire

This comment has been minimized.

Copy link

@nmadhire nmadhire commented May 8, 2015

Thanks. This is useful.

@rawkintrevo

This comment has been minimized.

Copy link

@rawkintrevo rawkintrevo commented May 8, 2015

Much appreciated!

@juanAFernandez

This comment has been minimized.

Copy link

@juanAFernandez juanAFernandez commented May 22, 2015

Very useful!

@JoelBender

This comment has been minimized.

Copy link

@JoelBender JoelBender commented Oct 16, 2015

As of this writing, the lastest version seems to be here: https://bintray.com/artifact/download/sbt/debian/sbt-0.13.9.deb

@SaurabhSakpal

This comment has been minimized.

Copy link

@SaurabhSakpal SaurabhSakpal commented Nov 19, 2015

It Works!Thanks a lot!

@krishnaarava

This comment has been minimized.

Copy link

@krishnaarava krishnaarava commented Nov 20, 2015

Thank you, worked :)

@fahmiardi

This comment has been minimized.

Copy link

@fahmiardi fahmiardi commented Jan 9, 2016

It works. Thanks!

@omendezmorales

This comment has been minimized.

Copy link

@omendezmorales omendezmorales commented Feb 21, 2016

works great; thanks

@zhmz90

This comment has been minimized.

Copy link

@zhmz90 zhmz90 commented Mar 22, 2016

works great; thanks

@suyesh

This comment has been minimized.

Copy link

@suyesh suyesh commented Apr 20, 2016

@radamus

This comment has been minimized.

Copy link

@radamus radamus commented May 16, 2016

Currently I was not able to download sbt debian package from artifactoryonline. I found that debian package is supported with package manager see: http://www.scala-sbt.org/0.13/docs/Installing-sbt-on-Linux.html. And it works. I've installed sbt 0.13.11.

@fsaldivars

This comment has been minimized.

Copy link

@fsaldivars fsaldivars commented May 18, 2016

Thank you Worked..

@Fei-Guang

This comment has been minimized.

Copy link

@Fei-Guang Fei-Guang commented Jul 5, 2016

sudo apt-get install libjansi-java before install scala

wget https://dl.bintray.com/sbt/debian/sbt-0.13.11.deb

@krithigowri

This comment has been minimized.

Copy link

@krithigowri krithigowri commented Aug 23, 2016

This worked thanks!!!

@svardhan12

This comment has been minimized.

Copy link

@svardhan12 svardhan12 commented Sep 7, 2016

Thank you very much!! This worked

@DanielGGordon

This comment has been minimized.

Copy link

@DanielGGordon DanielGGordon commented Oct 28, 2016

@mbonaci That is for installing a fresh scala and sbt. But doesn't help if you want a new version. I tried those commands and still have the same old version. It'd be nice if there was a better Ubuntu/Debian utility for upgrading Scala/Sbt to the latest versions. As far as I've seen, there isn't any.

This link seems to be the best way of upgrading SBT - but not Scala.

So, to update to some Scala version, just change the scalaVer variable below. As of now, the latest version is 2.11.8. So if that's what you need, you can leave these commands as-is:

# Mini Script for Updating Scala to some Scala version
# Does not update SBT. Just Scala.
# This is for Debian/Mint/Ubuntu distributions
scalaVer="2.11.8"
sudo apt-get remove scala-library scala
sudo wget www.scala-lang.org/files/archive/scala-"$scalaVer".deb
sudo dpkg -i scala-"$scalaVer".deb
sudo apt-get update
sudo apt-get install scala

Then, if you want to update sbt, I woulld use the officially supported method above.

@DanielGGordon

This comment has been minimized.

Copy link

@DanielGGordon DanielGGordon commented Oct 28, 2016

See my Gist updateScalaVersion.sh for a script that will update your Scala to some version. It is to be used like this:

sudo ./updateScalaVersion 2.11.8

@tiendv-1114

This comment has been minimized.

Copy link

@tiendv-1114 tiendv-1114 commented Nov 18, 2016

thank you 👍

@priteshkumbhare

This comment has been minimized.

Copy link

@priteshkumbhare priteshkumbhare commented May 8, 2017

Thanks

@proguest1942

This comment has been minimized.

Copy link

@proguest1942 proguest1942 commented Jun 27, 2017

  1. need to update to: sudo wget www.scala-lang.org/files/archive/scala-2.13.0-M1.deb for the latest scala version
@sarahESL

This comment has been minimized.

Copy link

@sarahESL sarahESL commented Jan 22, 2018

Awesome 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment