Ubuntu + scala REPL, Commands not typed on console

The following thing is working for me.

  1. Start sbt
  2. Open a scala console via sbt.

    ~$ sbt
        [info] Loading project definition from /home/abhay/project
        [info] Set current project to abhay (in build file:/home/abhay/)
        [warn] sbt server could not start because there's another instance of sbt running on this build.
        [warn] Running multiple instances is unsupported
        sbt:abhay> console
        [info] Starting scala interpreter...
        Welcome to Scala 2.12.4 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_161).
        Type in expressions for evaluation. Or try :help.
        scala> printf("Hello, Abhay!"); 
        Hello, Abhay!
        scala>
    

This is working for me for now.

I am pretty sure its some environment issue. Anyone else facing something similar?

~Abhay


To fix the problem in the current scala repl session run:

import sys.process._
"reset" !

To fix the problem completely removed scala and install it with dpkg (not with apt):

sudo apt-get remove scala-library scala
sudo wget www.scala-lang.org/files/archive/scala-2.11.12.deb
sudo dpkg -i scala-2.11.12.deb