Installing Scala on Ubuntu

. 1 min read

Howdy Folks. Let’s quickly check out Installing Scala on Ubuntu. There are multiple ways this can be done.

1 Using Ubuntu Repositories

Well, if you using Ubuntu, it’s quite straightforward to install it using the Ubuntu repositories. Fortunately, we already have a software package repository added in the recent versions of Ubuntu. Although Scala, requires Java and if you don’t want to install default OpenJDK and rather have Oracle JDK, check out this post.

For all those, who don’t know, Ubuntu ships with a package manager which can be used to install software packages. Some of these packages are not directly shipped with the Ubuntu but are available in third-party software package repositories.

1.1 Installing Scala

Alright, since we already have the repository, let’s just install the package.

sudo apt-get install scala

1.2 Verifying the install

Let’s just verify the installation by checking the Scala run-time version number.

scala -version

2 Manual Installation

There are always ways to install them manually if you come across some issue for some weird reason, or if you wish to install a different version of Scala.

2.1 Downloading Scala Binaries

The Scala binaries are shipped in the Ubuntu installable format called Debian packages. Let’s just grab one of those.


2.2 Installing Scala Binary

Installing a Debian binary is as simple as a command. This is the path to the downloaded package file.

dpkg -i scala-2.11.8.deb

2.3 Verifying the installation

scala --version