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
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…