sbt is a build tool for Scala and Java projects Like Apache Maven, Apache Ant. In our previously published guides, we have shown the steps to install Apache Maven and Gradle. Here Are The Steps on How To Install SBT and Scala on Ubuntu Server. This tool also not uncommon need while installation of Big Data tools. Initially full form of sbt was Simple Build Tool, but it is now known simply as “sbt”, has no other meaning. SBT natively support for compiling Scala code, continuous compilation, testing, and deployment and supports mixed Java/Scala projects. It’s dependency management is by using Ivy which as previously discussed supports Maven-format repositories.
How To Install SBT and Scala on Ubuntu Server
Update, Upgrade and install the software-properties-common package :
1 2 3 | apt update -y apt upgrade -y apt install software-properties-common apt-transport-https -y |
Add the ‘webupd8team’ PPA repository to the server :
---
1 2 | sudo add-apt-repository ppa:webupd8team/java -y apt upgrade |
Install the Java 8 installer from the PPA repository :
1 | apt install oracle-java8-installer -y |
Accept the Oracle License by choosing the ‘YES’ button. Check the java version :
1 | java -version |
Set Java environment variables and Oracle JDK8 as default :
1 | apt install oracle-java8-set-default |
Check Java compiler version :
1 | javac -version |
Remove any old version of Scala :
1 | sudo apt-get remove scala-library scala |
Download latest Debian installer for Ubuntu & deb Linux distro :
1 | https://www.scala-lang.org/download/ |
Install it, example is with version 2.12.6 :
1 2 3 4 | wget https://downloads.lightbend.com/scala/2.12.6/scala-2.12.6.deb sudo dpkg -i scala-2.12.6.deb apt update apt install scala |
As for SBT, official steps for Ubuntu 16.04 LTS is :
1 2 3 4 | 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 2EE0EA64E40A89B84B2DF73499E82A75642AC823 sudo apt-get update sudo apt-get install sbt |
Official documentation can be read on :
1 | https://www.scala-sbt.org/1.x/docs/index.html |
That is it.
Tagged With windows install sbt , sudo apt-get install sbt on windows , scala sbt install ubuntu , sbt java ubuntu , sbt donwload on ubuntu windows , install scala offline ubuntu , install sbt ubuntu , how to install sbt ubuntu , how to install sbt and scala , how to download sbt tool using wget