Ubuntu + scala REPL,未在控制台上键入命令 [英] Ubuntu + scala REPL, Commands not typed on console

查看:181
本文介绍了Ubuntu + scala REPL,未在控制台上键入命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Ubuntu 18.04 + Scala 2.11.12(OpenJDK 64位服务器VM,Java 1.8.0_162).

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

一旦打开Scala外壳,我将看不到我键入的任何内容.它虽然被键入.

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

下面是当我在控制台上键入 println("Hello, world!") 时的情况:

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?

推荐答案

要在当前的scala repl会话中解决此问题,请执行以下操作:

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

import sys.process._
"reset" !

要解决此问题,请完全删除scala并使用dpkg(而不是apt)安装它:

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

这篇关于Ubuntu + scala REPL,未在控制台上键入命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆