How To Install Scala on Ubuntu

A simple guide to install Scala on Ubuntu. Scala is object oriented and supports functional programming. Scala is used by Twitter, Foursquare, Coursera, etc…

This is very easy:

$ sudo apt update

 

Install Java on Ubuntu

This will install Java 8 JDK

$ sudo apt install default-jdk

When you run this:

$ java -version

You will get something like:

openjdk version "1.8.0_121"

 

Install Scala on Ubuntu

This will install Scala 2.11.

$ sudo apt install scala

When you run:

$ scala

You should get something like:

Welcome to Scala version 2.11.6 (OpenJDK 64-Bit Server VM, Java 1.8.0_121)

When you run the scala command you will get a shell similar to Ruby irb or the Python shell. In Scala this is the REPL shell. Also known as “read-execute-print-loop”.

The shell has the word “scala” and a greater than sign.

scala>

Type in :help to get more info:

scala>:help

This will get you:

All commands can be abbreviated, e.g., :he instead of :help.
:edit <id>|<line>  edit history
:help [command]  print this summary or command-specific help
:history [num]  show the history (optional num is commands to show)
:h? <string>  search the history
:imports [name name ...] show import history, identifying sources of names
:implicits [-v]  show the implicits in scope
:javap <path|class>  disassemble a file or class name
:line <id>|<line>  place line(s) at the end of history
:load <path>  interpret lines in a file
:paste [-raw] [path]  enter paste mode or paste a file
:power  enable power user mode
:quit  exit the interpreter
:replay [options]  reset the repl and replay all previous commands
:require <path>  add a jar to the classpath
:reset [options]  reset the repl to its initial state, forgetting all session entries
:save <path>  save replayable session to a file
:sh <command line>  run a shell command (result is implicitly => List[String])
:settings <options>  update compiler options, if possible; see reset
:silent  disable/enable automatic printing of results
:type [-v] <expr>  display the type of an expression without evaluating it
:kind [-v] <expr>  display the kind of expression's type
:warnings  show the suppressed warnings from the most recent line which had any

Quit Scala

To quit scala you can do either Ctrl + D or :quit

A simple Scala example

Create a new file called hello.scala

Using your favorite editor such as Vim:

vim hello.scala

Type in something simple such as:

println("Hola world")

Save and close.

Open scala:

$scala

Then load the file you created:

scala> :load hello.scala

The output should say:

Loading hello.scala
Hola world
 
scala>

Output when installing Java on Ubuntu

Just for reference this is the output when installing Java on Ubuntu:

$ sudo apt install default-jdk
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  linux-headers-4.4.0-59 linux-headers-4.4.0-59-generic linux-headers-4.4.0-64 linux-headers-4.4.0-64-generic
  linux-image-4.4.0-59-generic linux-image-4.4.0-64-generic linux-image-extra-4.4.0-59-generic linux-image-extra-4.4.0-64-generic
  linux-signed-image-4.4.0-59-generic linux-signed-image-4.4.0-64-generic
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  ca-certificates-java default-jdk-headless default-jre default-jre-headless fonts-dejavu-extra java-common libice-dev
  libpthread-stubs0-dev libsm-dev libx11-dev libx11-doc libxau-dev libxcb1-dev libxdmcp-dev libxt-dev openjdk-8-jdk
  openjdk-8-jdk-headless openjdk-8-jre openjdk-8-jre-headless x11proto-core-dev x11proto-input-dev x11proto-kb-dev
  xorg-sgml-doctools xtrans-dev
Suggested packages:
  default-java-plugin libice-doc libsm-doc libxcb-doc libxt-doc openjdk-8-demo openjdk-8-source visualvm icedtea-8-plugin
  openjdk-8-jre-jamvm fonts-ipafont-gothic fonts-ipafont-mincho fonts-indic
The following NEW packages will be installed:
  ca-certificates-java default-jdk default-jdk-headless default-jre default-jre-headless fonts-dejavu-extra java-common
  libice-dev libpthread-stubs0-dev libsm-dev libx11-dev libx11-doc libxau-dev libxcb1-dev libxdmcp-dev libxt-dev openjdk-8-jdk
  openjdk-8-jdk-headless openjdk-8-jre openjdk-8-jre-headless x11proto-core-dev x11proto-input-dev x11proto-kb-dev
  xorg-sgml-doctools xtrans-dev
0 upgraded, 25 newly installed, 0 to remove and 230 not upgraded.
Need to get 40.8 MB of archives.
After this operation, 165 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://us.archive.ubuntu.com/ubuntu xenial/main amd64 java-common all 0.56ubuntu2 [7,742 B]
Get:2 http://us.archive.ubuntu.com/ubuntu xenial/main amd64 default-jre-headless amd64 2:1.8-56ubuntu2 [4,380 B]
Get:3 http://us.archive.ubuntu.com/ubuntu xenial/main amd64 ca-certificates-java all 20160321 [12.9 kB]
Get:4 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 openjdk-8-jre-headless amd64 8u121-b13-0ubuntu1.16.04.2 [26.9 MB]
Get:5 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 openjdk-8-jre amd64 8u121-b13-0ubuntu1.16.04.2 [69.3 kB]
Get:6 http://us.archive.ubuntu.com/ubuntu xenial/main amd64 default-jre amd64 2:1.8-56ubuntu2 [980 B]
Get:7 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 openjdk-8-jdk-headless amd64 8u121-b13-0ubuntu1.16.04.2 [8,198 kB]
Get:8 http://us.archive.ubuntu.com/ubuntu xenial/main amd64 default-jdk-headless amd64 2:1.8-56ubuntu2 [986 B]
Get:9 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 openjdk-8-jdk amd64 8u121-b13-0ubuntu1.16.04.2 [450 kB]
Get:10 http://us.archive.ubuntu.com/ubuntu xenial/main amd64 default-jdk amd64 2:1.8-56ubuntu2 [968 B]
Get:11 http://us.archive.ubuntu.com/ubuntu xenial/main amd64 fonts-dejavu-extra all 2.35-1 [1,749 kB]
Get:12 http://us.archive.ubuntu.com/ubuntu xenial/main amd64 xorg-sgml-doctools all 1:1.11-1 [12.9 kB]
Get:13 http://us.archive.ubuntu.com/ubuntu xenial/main amd64 x11proto-core-dev all 7.0.28-2ubuntu1 [254 kB]
Get:14 http://us.archive.ubuntu.com/ubuntu xenial/main amd64 libice-dev amd64 2:1.0.9-1 [44.9 kB]
Get:15 http://us.archive.ubuntu.com/ubuntu xenial/main amd64 libpthread-stubs0-dev amd64 0.3-4 [4,068 B]
Get:16 http://us.archive.ubuntu.com/ubuntu xenial/main amd64 libsm-dev amd64 2:1.2.2-1 [16.2 kB]
Get:17 http://us.archive.ubuntu.com/ubuntu xenial/main amd64 libxau-dev amd64 1:1.0.8-1 [11.1 kB]
Get:18 http://us.archive.ubuntu.com/ubuntu xenial/main amd64 libxdmcp-dev amd64 1:1.1.2-1.1 [25.1 kB]
Get:19 http://us.archive.ubuntu.com/ubuntu xenial/main amd64 x11proto-input-dev all 2.3.1-1 [118 kB]
Get:20 http://us.archive.ubuntu.com/ubuntu xenial/main amd64 x11proto-kb-dev all 1.0.7-0ubuntu1 [224 kB]
Get:21 http://us.archive.ubuntu.com/ubuntu xenial/main amd64 xtrans-dev all 1.3.5-1 [70.5 kB]
Get:22 http://us.archive.ubuntu.com/ubuntu xenial/main amd64 libxcb1-dev amd64 1.11.1-1ubuntu1 [74.2 kB]
Get:23 http://us.archive.ubuntu.com/ubuntu xenial/main amd64 libx11-dev amd64 2:1.6.3-1ubuntu2 [642 kB]
Get:24 http://us.archive.ubuntu.com/ubuntu xenial/main amd64 libx11-doc all 2:1.6.3-1ubuntu2 [1,465 kB]
Get:25 http://us.archive.ubuntu.com/ubuntu xenial/main amd64 libxt-dev amd64 1:1.1.5-0ubuntu1 [394 kB]
Fetched 40.8 MB in 22s (1,820 kB/s)
Selecting previously unselected package java-common.
(Reading database ... 329061 files and directories currently installed.)
Preparing to unpack .../java-common_0.56ubuntu2_all.deb ...
Unpacking java-common (0.56ubuntu2) ...
Selecting previously unselected package default-jre-headless.
Preparing to unpack .../default-jre-headless_2%3a1.8-56ubuntu2_amd64.deb ...
Unpacking default-jre-headless (2:1.8-56ubuntu2) ...
Selecting previously unselected package ca-certificates-java.
Preparing to unpack .../ca-certificates-java_20160321_all.deb ...
Unpacking ca-certificates-java (20160321) ...
Selecting previously unselected package openjdk-8-jre-headless:amd64.
Preparing to unpack .../openjdk-8-jre-headless_8u121-b13-0ubuntu1.16.04.2_amd64.deb ...
Unpacking openjdk-8-jre-headless:amd64 (8u121-b13-0ubuntu1.16.04.2) ...
Selecting previously unselected package openjdk-8-jre:amd64.
Preparing to unpack .../openjdk-8-jre_8u121-b13-0ubuntu1.16.04.2_amd64.deb ...
Unpacking openjdk-8-jre:amd64 (8u121-b13-0ubuntu1.16.04.2) ...
Selecting previously unselected package default-jre.
Preparing to unpack .../default-jre_2%3a1.8-56ubuntu2_amd64.deb ...
Unpacking default-jre (2:1.8-56ubuntu2) ...
Selecting previously unselected package openjdk-8-jdk-headless:amd64.
Preparing to unpack .../openjdk-8-jdk-headless_8u121-b13-0ubuntu1.16.04.2_amd64.deb ...
Unpacking openjdk-8-jdk-headless:amd64 (8u121-b13-0ubuntu1.16.04.2) ...
Selecting previously unselected package default-jdk-headless.
Preparing to unpack .../default-jdk-headless_2%3a1.8-56ubuntu2_amd64.deb ...
Unpacking default-jdk-headless (2:1.8-56ubuntu2) ...
Selecting previously unselected package openjdk-8-jdk:amd64.
Preparing to unpack .../openjdk-8-jdk_8u121-b13-0ubuntu1.16.04.2_amd64.deb ...
Unpacking openjdk-8-jdk:amd64 (8u121-b13-0ubuntu1.16.04.2) ...
Selecting previously unselected package default-jdk.
Preparing to unpack .../default-jdk_2%3a1.8-56ubuntu2_amd64.deb ...
Unpacking default-jdk (2:1.8-56ubuntu2) ...
Selecting previously unselected package fonts-dejavu-extra.
Preparing to unpack .../fonts-dejavu-extra_2.35-1_all.deb ...
Unpacking fonts-dejavu-extra (2.35-1) ...
Selecting previously unselected package xorg-sgml-doctools.
Preparing to unpack .../xorg-sgml-doctools_1%3a1.11-1_all.deb ...
Unpacking xorg-sgml-doctools (1:1.11-1) ...
Selecting previously unselected package x11proto-core-dev.
Preparing to unpack .../x11proto-core-dev_7.0.28-2ubuntu1_all.deb ...
Unpacking x11proto-core-dev (7.0.28-2ubuntu1) ...
Selecting previously unselected package libice-dev:amd64.
Preparing to unpack .../libice-dev_2%3a1.0.9-1_amd64.deb ...
Unpacking libice-dev:amd64 (2:1.0.9-1) ...
Selecting previously unselected package libpthread-stubs0-dev:amd64.
Preparing to unpack .../libpthread-stubs0-dev_0.3-4_amd64.deb ...
Unpacking libpthread-stubs0-dev:amd64 (0.3-4) ...
Selecting previously unselected package libsm-dev:amd64.
Preparing to unpack .../libsm-dev_2%3a1.2.2-1_amd64.deb ...
Unpacking libsm-dev:amd64 (2:1.2.2-1) ...
Selecting previously unselected package libxau-dev:amd64.
Preparing to unpack .../libxau-dev_1%3a1.0.8-1_amd64.deb ...
Unpacking libxau-dev:amd64 (1:1.0.8-1) ...
Selecting previously unselected package libxdmcp-dev:amd64.
Preparing to unpack .../libxdmcp-dev_1%3a1.1.2-1.1_amd64.deb ...
Unpacking libxdmcp-dev:amd64 (1:1.1.2-1.1) ...
Selecting previously unselected package x11proto-input-dev.
Preparing to unpack .../x11proto-input-dev_2.3.1-1_all.deb ...
Unpacking x11proto-input-dev (2.3.1-1) ...
Selecting previously unselected package x11proto-kb-dev.
Preparing to unpack .../x11proto-kb-dev_1.0.7-0ubuntu1_all.deb ...
Unpacking x11proto-kb-dev (1.0.7-0ubuntu1) ...
Selecting previously unselected package xtrans-dev.
Preparing to unpack .../xtrans-dev_1.3.5-1_all.deb ...
Unpacking xtrans-dev (1.3.5-1) ...
Selecting previously unselected package libxcb1-dev:amd64.
Preparing to unpack .../libxcb1-dev_1.11.1-1ubuntu1_amd64.deb ...
Unpacking libxcb1-dev:amd64 (1.11.1-1ubuntu1) ...
Selecting previously unselected package libx11-dev:amd64.
Preparing to unpack .../libx11-dev_2%3a1.6.3-1ubuntu2_amd64.deb ...
Unpacking libx11-dev:amd64 (2:1.6.3-1ubuntu2) ...
Selecting previously unselected package libx11-doc.
Preparing to unpack .../libx11-doc_2%3a1.6.3-1ubuntu2_all.deb ...
Unpacking libx11-doc (2:1.6.3-1ubuntu2) ...
Selecting previously unselected package libxt-dev:amd64.
Preparing to unpack .../libxt-dev_1%3a1.1.5-0ubuntu1_amd64.deb ...
Unpacking libxt-dev:amd64 (1:1.1.5-0ubuntu1) ...
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for ca-certificates (20160104ubuntu1) ...
Updating certificates in /etc/ssl/certs...
0 added, 0 removed; done.
Running hooks in /etc/ca-certificates/update.d...
done.
Processing triggers for libc-bin (2.23-0ubuntu7) ...
Processing triggers for hicolor-icon-theme (0.15-0ubuntu1) ...
Processing triggers for gnome-menus (3.13.3-6ubuntu3.1) ...
Processing triggers for desktop-file-utils (0.22-1ubuntu5) ...
Processing triggers for bamfdaemon (0.5.3~bzr0+16.04.20160701-0ubuntu1) ...
Rebuilding /usr/share/applications/bamf-2.index...
Processing triggers for mime-support (3.59ubuntu1) ...
Processing triggers for fontconfig (2.11.94-0ubuntu1.1) ...
Setting up java-common (0.56ubuntu2) ...
Setting up fonts-dejavu-extra (2.35-1) ...
Setting up xorg-sgml-doctools (1:1.11-1) ...
Setting up x11proto-core-dev (7.0.28-2ubuntu1) ...
Setting up libice-dev:amd64 (2:1.0.9-1) ...
Setting up libpthread-stubs0-dev:amd64 (0.3-4) ...
Setting up libsm-dev:amd64 (2:1.2.2-1) ...
Setting up libxau-dev:amd64 (1:1.0.8-1) ...
Setting up libxdmcp-dev:amd64 (1:1.1.2-1.1) ...
Setting up x11proto-input-dev (2.3.1-1) ...
Setting up x11proto-kb-dev (1.0.7-0ubuntu1) ...
Setting up xtrans-dev (1.3.5-1) ...
Setting up libxcb1-dev:amd64 (1.11.1-1ubuntu1) ...
Setting up libx11-dev:amd64 (2:1.6.3-1ubuntu2) ...
Setting up libx11-doc (2:1.6.3-1ubuntu2) ...
Setting up libxt-dev:amd64 (1:1.1.5-0ubuntu1) ...
Setting up ca-certificates-java (20160321) ...
Adding debian:AffirmTrust_Premium.pem
Adding debian:Atos_TrustedRoot_2011.pem
Adding debian:Taiwan_GRCA.pem
Adding debian:AddTrust_Qualified_Certificates_Root.pem
Adding debian:Sonera_Class_2_Root_CA.pem
Adding debian:DigiCert_Assured_ID_Root_G2.pem
Adding debian:Microsec_e-Szigno_Root_CA_2009.pem
Adding debian:DigiCert_Trusted_Root_G4.pem
Adding debian:Starfield_Root_Certificate_Authority_-_G2.pem
Adding debian:E-Tugra_Certification_Authority.pem
Adding debian:Entrust.net_Premium_2048_Secure_Server_CA.pem
Adding debian:ACEDICOM_Root.pem
Adding debian:AddTrust_Low-Value_Services_Root.pem
Adding debian:ACCVRAIZ1.pem
Adding debian:Certinomis_-_Autorité_Racine.pem
Adding debian:Verisign_Class_3_Public_Primary_Certification_Authority_2.pem
Adding debian:Verisign_Class_2_Public_Primary_Certification_Authority_-_G3.pem
Adding debian:TC_TrustCenter_Class_3_CA_II.pem
Adding debian:Baltimore_CyberTrust_Root.pem
Adding debian:Entrust_Root_Certification_Authority_-_G2.pem
Adding debian:GlobalSign_Root_CA.pem
Adding debian:DigiCert_High_Assurance_EV_Root_CA.pem
Adding debian:GlobalSign_ECC_Root_CA_-_R5.pem
Adding debian:Izenpe.com.pem
Adding debian:AffirmTrust_Commercial.pem
Adding debian:QuoVadis_Root_CA_2_G3.pem
Adding debian:USERTrust_ECC_Certification_Authority.pem
Adding debian:GlobalSign_ECC_Root_CA_-_R4.pem
Adding debian:Security_Communication_EV_RootCA1.pem
Adding debian:Verisign_Class_1_Public_Primary_Certification_Authority_-_G3.pem
Adding debian:Camerfirma_Global_Chambersign_Root.pem
Adding debian:UTN_USERFirst_Hardware_Root_CA.pem
Adding debian:Equifax_Secure_Global_eBusiness_CA.pem
Adding debian:VeriSign_Class_3_Public_Primary_Certification_Authority_-_G5.pem
Adding debian:PSCProcert.pem
Adding debian:QuoVadis_Root_CA.pem
Adding debian:NetLock_Notary_=Class_A=_Root.pem
Adding debian:Root_CA_Generalitat_Valenciana.pem
Adding debian:D-TRUST_Root_Class_3_CA_2_2009.pem
Adding debian:StartCom_Certification_Authority_G2.pem
Adding debian:SwissSign_Platinum_CA_-_G2.pem
Adding debian:GeoTrust_Primary_Certification_Authority_-_G3.pem
Adding debian:SecureTrust_CA.pem
Adding debian:Staat_der_Nederlanden_Root_CA.pem
Adding debian:Sonera_Class_1_Root_CA.pem
Adding debian:GeoTrust_Primary_Certification_Authority.pem
Adding debian:Hellenic_Academic_and_Research_Institutions_RootCA_2011.pem
Adding debian:Juur-SK.pem
Adding debian:EE_Certification_Centre_Root_CA.pem
Adding debian:Staat_der_Nederlanden_Root_CA_-_G2.pem
Adding debian:Camerfirma_Chambers_of_Commerce_Root.pem
Adding debian:GeoTrust_Global_CA.pem
Adding debian:AC_Raíz_Certicámara_S.A..pem
Adding debian:QuoVadis_Root_CA_2.pem
Adding debian:T-TeleSec_GlobalRoot_Class_2.pem
Adding debian:Comodo_Trusted_Services_root.pem
Adding debian:Verisign_Class_3_Public_Primary_Certification_Authority.pem
Adding debian:GeoTrust_Global_CA_2.pem
Adding debian:CFCA_EV_ROOT.pem
Adding debian:Equifax_Secure_CA.pem
Adding debian:Certum_Trusted_Network_CA.pem
Adding debian:certSIGN_ROOT_CA.pem
Adding debian:Swisscom_Root_CA_1.pem
Adding debian:ApplicationCA_-_Japanese_Government.pem
Adding debian:UbuntuOne-ValiCert_Class_2_VA.pem
Adding debian:Secure_Global_CA.pem
Adding debian:Go_Daddy_Root_Certificate_Authority_-_G2.pem
Adding debian:COMODO_RSA_Certification_Authority.pem
Adding debian:QuoVadis_Root_CA_3_G3.pem
Adding debian:Security_Communication_RootCA2.pem
Adding debian:Entrust_Root_Certification_Authority_-_EC1.pem
Adding debian:QuoVadis_Root_CA_1_G3.pem
Adding debian:DST_Root_CA_X3.pem
Adding debian:Verisign_Class_2_Public_Primary_Certification_Authority_-_G2.pem
Adding debian:XRamp_Global_CA_Root.pem
Adding debian:ePKI_Root_Certification_Authority.pem
Adding debian:Certplus_Class_2_Primary_CA.pem
Adding debian:QuoVadis_Root_CA_3.pem
Adding debian:WellsSecure_Public_Root_Certificate_Authority.pem
Adding debian:SwissSign_Gold_CA_-_G2.pem
Adding debian:WoSign_China.pem
Adding debian:TWCA_Root_Certification_Authority.pem
Adding debian:Swisscom_Root_CA_2.pem
Adding debian:TÜRKTRUST_Elektronik_Sertifika_Hizmet_Sağlayıcısı_H6.pem
Adding debian:DigiCert_Global_Root_CA.pem
Adding debian:Actalis_Authentication_Root_CA.pem
Adding debian:AffirmTrust_Premium_ECC.pem
Adding debian:CA_WoSign_ECC_Root.pem
Adding debian:Equifax_Secure_eBusiness_CA_1.pem
Adding debian:thawte_Primary_Root_CA_-_G2.pem
Adding debian:Certification_Authority_of_WoSign_G2.pem
Adding debian:DST_ACES_CA_X6.pem
Adding debian:IGC_A.pem
Adding debian:Go_Daddy_Class_2_CA.pem
Adding debian:Trustis_FPS_Root_CA.pem
Adding debian:NetLock_Business_=Class_B=_Root.pem
Adding debian:EC-ACC.pem
Adding debian:WoSign.pem
Adding debian:IdenTrust_Commercial_Root_CA_1.pem
Adding debian:T-TeleSec_GlobalRoot_Class_3.pem
Adding debian:Chambers_of_Commerce_Root_-_2008.pem
Adding debian:DigiCert_Assured_ID_Root_CA.pem
Adding debian:DigiCert_Assured_ID_Root_G3.pem
Adding debian:Staat_der_Nederlanden_EV_Root_CA.pem
Adding debian:thawte_Primary_Root_CA_-_G3.pem
Adding debian:AddTrust_External_Root.pem
Adding debian:DigiCert_Global_Root_G3.pem
Adding debian:VeriSign_Universal_Root_Certification_Authority.pem
Adding debian:COMODO_Certification_Authority.pem
Adding debian:TURKTRUST_Certificate_Services_Provider_Root_2007.pem
Adding debian:Verisign_Class_3_Public_Primary_Certification_Authority_-_G2.pem
Adding debian:Cybertrust_Global_Root.pem
Adding debian:COMODO_ECC_Certification_Authority.pem
Adding debian:UbuntuOne-Go_Daddy_CA.pem
Adding debian:TWCA_Global_Root_CA.pem
Adding debian:StartCom_Certification_Authority_2.pem
Adding debian:NetLock_Express_=Class_C=_Root.pem
Adding debian:ComSign_CA.pem
Adding debian:GlobalSign_Root_CA_-_R3.pem
Adding debian:GlobalSign_Root_CA_-_R2.pem
Adding debian:Visa_eCommerce_Root.pem
Adding debian:OISTE_WISeKey_Global_Root_GB_CA.pem
Adding debian:UbuntuOne-Go_Daddy_Class_2_CA.pem
Adding debian:Certinomis_-_Root_CA.pem
Adding debian:Security_Communication_Root_CA.pem
Adding debian:Buypass_Class_2_Root_CA.pem
Adding debian:Entrust_Root_Certification_Authority.pem
Adding debian:S-TRUST_Universal_Root_CA.pem
Adding debian:Microsec_e-Szigno_Root_CA.pem
Adding debian:Autoridad_de_Certificacion_Firmaprofesional_CIF_A62634068.pem
Adding debian:Verisign_Class_3_Public_Primary_Certification_Authority_-_G3.pem
Adding debian:Buypass_Class_3_Root_CA.pem
Adding debian:IdenTrust_Public_Sector_Root_CA_1.pem
Adding debian:TeliaSonera_Root_CA_v1.pem
Adding debian:TÜBİTAK_UEKAE_Kök_Sertifika_Hizmet_Sağlayıcısı_-_Sürüm_3.pem
Adding debian:GeoTrust_Universal_CA.pem
Adding debian:SwissSign_Silver_CA_-_G2.pem
Adding debian:Staat_der_Nederlanden_Root_CA_-_G3.pem
Adding debian:Swisscom_Root_EV_CA_2.pem
Adding debian:Global_Chambersign_Root_-_2008.pem
Adding debian:thawte_Primary_Root_CA.pem
Adding debian:OISTE_WISeKey_Global_Root_GA_CA.pem
Adding debian:Hongkong_Post_Root_CA_1.pem
Adding debian:GeoTrust_Primary_Certification_Authority_-_G2.pem
Adding debian:D-TRUST_Root_Class_3_CA_2_EV_2009.pem
Adding debian:China_Internet_Network_Information_Center_EV_Certificates_Root.pem
Adding debian:GeoTrust_Universal_CA_2.pem
Adding debian:VeriSign_Class_3_Public_Primary_Certification_Authority_-_G4.pem
Adding debian:Comodo_AAA_Services_root.pem
Adding debian:AddTrust_Public_Services_Root.pem
Adding debian:RSA_Security_2048_v3.pem
Adding debian:USERTrust_RSA_Certification_Authority.pem
Adding debian:DigiCert_Global_Root_G2.pem
Adding debian:CA_Disig.pem
Adding debian:Certum_Root_CA.pem
Adding debian:EBG_Elektronik_Sertifika_Hizmet_Sağlayıcısı.pem
Adding debian:CA_Disig_Root_R2.pem
Adding debian:NetLock_Arany_=Class_Gold=_Főtanúsítvány.pem
Adding debian:Deutsche_Telekom_Root_CA_2.pem
Adding debian:Network_Solutions_Certificate_Authority.pem
Adding debian:Verisign_Class_1_Public_Primary_Certification_Authority.pem
Adding debian:ssl-cert-snakeoil.pem
Adding debian:Starfield_Services_Root_Certificate_Authority_-_G2.pem
Adding debian:Buypass_Class_2_CA_1.pem
Adding debian:S-TRUST_Authentication_and_Encryption_Root_CA_2005_PN.pem
Adding debian:SecureSign_RootCA11.pem
Adding debian:CNNIC_ROOT.pem
Adding debian:Certigna.pem
Adding debian:AffirmTrust_Networking.pem
Adding debian:CA_Disig_Root_R1.pem
Adding debian:Verisign_Class_1_Public_Primary_Certification_Authority_-_G2.pem
Adding debian:StartCom_Certification_Authority.pem
Adding debian:NetLock_Qualified_=Class_QA=_Root.pem
Adding debian:Starfield_Class_2_CA.pem
Adding debian:Comodo_Secure_Services_root.pem
Adding debian:TÜRKTRUST_Elektronik_Sertifika_Hizmet_Sağlayıcısı_H5.pem
Adding debian:UTN_USERFirst_Email_Root_CA.pem
done.
Processing triggers for ca-certificates (20160104ubuntu1) ...
Updating certificates in /etc/ssl/certs...
0 added, 0 removed; done.
Running hooks in /etc/ca-certificates/update.d...
  done.
done.
Setting up openjdk-8-jre-headless:amd64 (8u121-b13-0ubuntu1.16.04.2) ...
update-alternatives: using /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/rmid to provide /usr/bin/rmid (rmid) in auto mode
update-alternatives: using /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java to provide /usr/bin/java (java) in auto mode
update-alternatives: using /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/keytool to provide /usr/bin/keytool (keytool) in auto mode
update-alternatives: using /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/jjs to provide /usr/bin/jjs (jjs) in auto mode
update-alternatives: using /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/pack200 to provide /usr/bin/pack200 (pack200) in auto mode
update-alternatives: using /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/rmiregistry to provide /usr/bin/rmiregistry (rmiregistry) in auto mode
update-alternatives: using /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/unpack200 to provide /usr/bin/unpack200 (unpack200) in auto mode
update-alternatives: using /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/orbd to provide /usr/bin/orbd (orbd) in auto mode
update-alternatives: using /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/servertool to provide /usr/bin/servertool (servertool) in auto mode
update-alternatives: using /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/tnameserv to provide /usr/bin/tnameserv (tnameserv) in auto mode
update-alternatives: using /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/jexec to provide /usr/bin/jexec (jexec) in auto mode
Setting up default-jre-headless (2:1.8-56ubuntu2) ...
Setting up openjdk-8-jre:amd64 (8u121-b13-0ubuntu1.16.04.2) ...
update-alternatives: using /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/policytool to provide /usr/bin/policytool (policytool) in auto mode
Setting up default-jre (2:1.8-56ubuntu2) ...
Setting up openjdk-8-jdk-headless:amd64 (8u121-b13-0ubuntu1.16.04.2) ...
update-alternatives: using /usr/lib/jvm/java-8-openjdk-amd64/bin/idlj to provide /usr/bin/idlj (idlj) in auto mode
update-alternatives: using /usr/lib/jvm/java-8-openjdk-amd64/bin/jdeps to provide /usr/bin/jdeps (jdeps) in auto mode
update-alternatives: using /usr/lib/jvm/java-8-openjdk-amd64/bin/wsimport to provide /usr/bin/wsimport (wsimport) in auto mode
update-alternatives: using /usr/lib/jvm/java-8-openjdk-amd64/bin/rmic to provide /usr/bin/rmic (rmic) in auto mode
update-alternatives: using /usr/lib/jvm/java-8-openjdk-amd64/bin/jinfo to provide /usr/bin/jinfo (jinfo) in auto mode
update-alternatives: using /usr/lib/jvm/java-8-openjdk-amd64/bin/jsadebugd to provide /usr/bin/jsadebugd (jsadebugd) in auto mode
update-alternatives: using /usr/lib/jvm/java-8-openjdk-amd64/bin/native2ascii to provide /usr/bin/native2ascii (native2ascii) in auto mode
update-alternatives: using /usr/lib/jvm/java-8-openjdk-amd64/bin/jstat to provide /usr/bin/jstat (jstat) in auto mode
update-alternatives: using /usr/lib/jvm/java-8-openjdk-amd64/bin/javadoc to provide /usr/bin/javadoc (javadoc) in auto mode
update-alternatives: using /usr/lib/jvm/java-8-openjdk-amd64/bin/javah to provide /usr/bin/javah (javah) in auto mode
update-alternatives: using /usr/lib/jvm/java-8-openjdk-amd64/bin/jstack to provide /usr/bin/jstack (jstack) in auto mode
update-alternatives: using /usr/lib/jvm/java-8-openjdk-amd64/bin/jrunscript to provide /usr/bin/jrunscript (jrunscript) in auto mode
update-alternatives: using /usr/lib/jvm/java-8-openjdk-amd64/bin/javac to provide /usr/bin/javac (javac) in auto mode
update-alternatives: using /usr/lib/jvm/java-8-openjdk-amd64/bin/javap to provide /usr/bin/javap (javap) in auto mode
update-alternatives: using /usr/lib/jvm/java-8-openjdk-amd64/bin/jar to provide /usr/bin/jar (jar) in auto mode
update-alternatives: using /usr/lib/jvm/java-8-openjdk-amd64/bin/extcheck to provide /usr/bin/extcheck (extcheck) in auto mode
update-alternatives: using /usr/lib/jvm/java-8-openjdk-amd64/bin/schemagen to provide /usr/bin/schemagen (schemagen) in auto mode
update-alternatives: using /usr/lib/jvm/java-8-openjdk-amd64/bin/jps to provide /usr/bin/jps (jps) in auto mode
update-alternatives: using /usr/lib/jvm/java-8-openjdk-amd64/bin/xjc to provide /usr/bin/xjc (xjc) in auto mode
update-alternatives: using /usr/lib/jvm/java-8-openjdk-amd64/bin/jmap to provide /usr/bin/jmap (jmap) in auto mode
update-alternatives: using /usr/lib/jvm/java-8-openjdk-amd64/bin/jstatd to provide /usr/bin/jstatd (jstatd) in auto mode
update-alternatives: using /usr/lib/jvm/java-8-openjdk-amd64/bin/jhat to provide /usr/bin/jhat (jhat) in auto mode
update-alternatives: using /usr/lib/jvm/java-8-openjdk-amd64/bin/jdb to provide /usr/bin/jdb (jdb) in auto mode
update-alternatives: using /usr/lib/jvm/java-8-openjdk-amd64/bin/serialver to provide /usr/bin/serialver (serialver) in auto mode
update-alternatives: using /usr/lib/jvm/java-8-openjdk-amd64/bin/wsgen to provide /usr/bin/wsgen (wsgen) in auto mode
update-alternatives: using /usr/lib/jvm/java-8-openjdk-amd64/bin/jcmd to provide /usr/bin/jcmd (jcmd) in auto mode
update-alternatives: using /usr/lib/jvm/java-8-openjdk-amd64/bin/jarsigner to provide /usr/bin/jarsigner (jarsigner) in auto mode
Setting up default-jdk-headless (2:1.8-56ubuntu2) ...
Setting up openjdk-8-jdk:amd64 (8u121-b13-0ubuntu1.16.04.2) ...
update-alternatives: using /usr/lib/jvm/java-8-openjdk-amd64/bin/appletviewer to provide /usr/bin/appletviewer (appletviewer) in auto mode
update-alternatives: using /usr/lib/jvm/java-8-openjdk-amd64/bin/jconsole to provide /usr/bin/jconsole (jconsole) in auto mode
Setting up default-jdk (2:1.8-56ubuntu2) ...
Processing triggers for libc-bin (2.23-0ubuntu7) ...
$ java -version
openjdk version "1.8.0_121"
OpenJDK Runtime Environment (build 1.8.0_121-8u121-b13-0ubuntu1.16.04.2-b13)
OpenJDK 64-Bit Server VM (build 25.121-b13, mixed mode)

Output when installing Scala on Ubuntu

Just for reference this is the output when installing Scala on Ubuntu.

$ sudo apt install scala
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  linux-headers-4.4.0-59 linux-headers-4.4.0-59-generic linux-headers-4.4.0-64 linux-headers-4.4.0-64-generic
  linux-image-4.4.0-59-generic linux-image-4.4.0-64-generic linux-image-extra-4.4.0-59-generic linux-image-extra-4.4.0-64-generic
  linux-signed-image-4.4.0-59-generic linux-signed-image-4.4.0-64-generic
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  libhawtjni-runtime-java libjansi-java libjansi-native-java libjline2-java scala-library scala-parser-combinators scala-xml
Suggested packages:
  scala-doc
The following NEW packages will be installed:
  libhawtjni-runtime-java libjansi-java libjansi-native-java libjline2-java scala scala-library scala-parser-combinators
  scala-xml
0 upgraded, 8 newly installed, 0 to remove and 230 not upgraded.
Need to get 23.6 MB of archives.
After this operation, 28.1 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://us.archive.ubuntu.com/ubuntu xenial/universe amd64 libhawtjni-runtime-java all 1.10-1 [54.0 kB]
Get:2 http://us.archive.ubuntu.com/ubuntu xenial/universe amd64 libjansi-native-java all 1.0-4 [35.3 kB]
Get:3 http://us.archive.ubuntu.com/ubuntu xenial/universe amd64 libjansi-java all 1.4-3 [57.4 kB]
Get:4 http://us.archive.ubuntu.com/ubuntu xenial/universe amd64 libjline2-java all 2.11-4 [107 kB]
Get:5 http://us.archive.ubuntu.com/ubuntu xenial/universe amd64 scala-library all 2.11.6-6 [9,239 kB]
Get:6 http://us.archive.ubuntu.com/ubuntu xenial/universe amd64 scala-parser-combinators all 1.0.3-3 [355 kB]
Get:7 http://us.archive.ubuntu.com/ubuntu xenial/universe amd64 scala-xml all 1.0.3-3 [601 kB]
Get:8 http://us.archive.ubuntu.com/ubuntu xenial/universe amd64 scala all 2.11.6-6 [13.1 MB]
Fetched 23.6 MB in 11s (1,993 kB/s)
Selecting previously unselected package libhawtjni-runtime-java.
(Reading database ... 330888 files and directories currently installed.)
Preparing to unpack .../libhawtjni-runtime-java_1.10-1_all.deb ...
Unpacking libhawtjni-runtime-java (1.10-1) ...
Selecting previously unselected package libjansi-native-java.
Preparing to unpack .../libjansi-native-java_1.0-4_all.deb ...
Unpacking libjansi-native-java (1.0-4) ...
Selecting previously unselected package libjansi-java.
Preparing to unpack .../libjansi-java_1.4-3_all.deb ...
Unpacking libjansi-java (1.4-3) ...
Selecting previously unselected package libjline2-java.
Preparing to unpack .../libjline2-java_2.11-4_all.deb ...
Unpacking libjline2-java (2.11-4) ...
Selecting previously unselected package scala-library.
Preparing to unpack .../scala-library_2.11.6-6_all.deb ...
Unpacking scala-library (2.11.6-6) ...
Selecting previously unselected package scala-parser-combinators.
Preparing to unpack .../scala-parser-combinators_1.0.3-3_all.deb ...
Unpacking scala-parser-combinators (1.0.3-3) ...
Selecting previously unselected package scala-xml.
Preparing to unpack .../scala-xml_1.0.3-3_all.deb ...
Unpacking scala-xml (1.0.3-3) ...
Selecting previously unselected package scala.
Preparing to unpack .../scala_2.11.6-6_all.deb ...
Unpacking scala (2.11.6-6) ...
Processing triggers for doc-base (0.10.7) ...
Processing 3 added doc-base files...
Setting up libhawtjni-runtime-java (1.10-1) ...
Setting up libjansi-native-java (1.0-4) ...
Setting up libjansi-java (1.4-3) ...
Setting up libjline2-java (2.11-4) ...
Setting up scala-library (2.11.6-6) ...
Setting up scala-parser-combinators (1.0.3-3) ...
Setting up scala-xml (1.0.3-3) ...
Setting up scala (2.11.6-6) ...
update-alternatives: using /usr/share/scala-2.11/bin/scala to provide /usr/bin/scala (scala) in auto mode
$ scala
Welcome to Scala version 2.11.6 (OpenJDK 64-Bit Server VM, Java 1.8.0_121).
Type in expressions to have them evaluated.
Type :help for more information.

Add a comment below if this helps or not

Related Post

Go to the Previous Directory in Vim I use Vim. Vim is the most productive text editor if you know some vim commands When I open a file and I am done with it. I often want to go...
Export Data From Firebird Database to CSV File Background Some software applications use a database called Firebird. This is an open source database. If the software application is compiled you ca...
Installing Ruby on Ubuntu Installing Ruby on Ubuntu As seen on RVM... Go to the terminal in Ubuntu. Add the public key from RVM $ gpg --keyserver hkp://keys.gnupg.n...
Installing Hipchat on Ubuntu Tested on: Ubuntu 12.04 LTS Thinkpad T400, 2GB RAM Intel Core 2 Duo CPU P8600, 32bit Sources: Official hipchat linux instructions Ask U...

Leave a Reply