Ubuntu + scala REPL, Commands not typed on console

Abhay Dandekar picture Abhay Dandekar · Apr 12, 2018 · Viewed 9.6k times · Source

I am using Ubuntu 18.04 + Scala 2.11.12 (OpenJDK 64-Bit Server VM, Java 1.8.0_162).

Once I open the scala shell, I am not able to see anything that I type. It gets typed though.

Below is how it is happening when I type println("Hello, world!") at console:

$ scala 
Welcome to Scala 2.11.12 (OpenJDK 64-Bit Server VM, Java 1.8.0_162).
Type in expressions for evaluation. Or try :help.

scala> Hello, world!

scala>

Any ideas on how we can get through?

Answer

mgershen picture mgershen · Jul 31, 2018

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