gpt4 book ai didi

scala - Scala因代码完成库而崩溃

转载 作者:行者123 更新时间:2023-12-03 16:07:22 25 4
gpt4 key购买 nike

当我尝试在Scala REPL中执行任何表达式时,它崩溃了。这里回溯

Exception in thread "Thread-1" Exception in thread "main" java.lang.InterruptedException
at java.util.concurrent.SynchronousQueue.put(SynchronousQueue.java:879)
at scala.tools.nsc.interpreter.SplashLoop.run(InteractiveReader.scala:77)
at java.lang.Thread.run(Thread.java:745)
java.lang.NoSuchMethodError: jline.console.completer.CandidateListCompletionHandler.setPrintSpaceAfterFullCompletion(Z)V
at scala.tools.nsc.interpreter.jline.JLineConsoleReader.initCompletion(JLineReader.scala:136)
at scala.tools.nsc.interpreter.jline.InteractiveReader.postInit(JLineReader.scala:51)
at scala.tools.nsc.interpreter.ILoop.$anonfun$process$4(ILoop.scala:899)
at scala.tools.nsc.interpreter.ILoop.$anonfun$process$4$adapted(ILoop.scala:897)
at scala.tools.nsc.interpreter.SplashReader.postInit(InteractiveReader.scala:130)
at scala.tools.nsc.interpreter.ILoop.$anonfun$process$5(ILoop.scala:926)
at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:12)
at scala.tools.nsc.interpreter.ILoop.$anonfun$mumly$1(ILoop.scala:188)
at scala.tools.nsc.interpreter.IMain.beQuietDuring(IMain.scala:209)
at scala.tools.nsc.interpreter.ILoop.mumly(ILoop.scala:185)
at scala.tools.nsc.interpreter.ILoop.loopPostInit$1(ILoop.scala:908)
at scala.tools.nsc.interpreter.ILoop.$anonfun$process$11(ILoop.scala:979)
at scala.tools.nsc.interpreter.ILoop.startup$1(ILoop.scala:947)
at scala.tools.nsc.interpreter.ILoop.$anonfun$process$1(ILoop.scala:990)
at scala.tools.nsc.interpreter.ILoop.process(ILoop.scala:892)
at scala.tools.nsc.MainGenericRunner.runTarget$1(MainGenericRunner.scala:79)
at scala.tools.nsc.MainGenericRunner.run$1(MainGenericRunner.scala:92)
at scala.tools.nsc.MainGenericRunner.process(MainGenericRunner.scala:103)
at scala.tools.nsc.MainGenericRunner$.main(MainGenericRunner.scala:108)
at scala.tools.nsc.MainGenericRunner.main(MainGenericRunner.scala)

表达式示例: 1 + 1
Scala: Scala code runner version 2.12.0 -- Copyright 2002-2016, LAMP/EPFL and Lightbend, Inc.
Java:
java version "1.8.0_112"
Java(TM) SE Runtime Environment (build 1.8.0_112-b16)
Java HotSpot(TM) 64-Bit Server VM (build 25.112-b16, mixed mode)

操作系统: macOS 10.12
我该如何解决这个问题?

最佳答案

我试图从OS中删除所有已安装的scala,并在此安装后从brew中删除了最新的scala版本。

命令如下所示:

brew uninstall sbt
brew uninstall scala
rm -rf /Application/Scala
brew upgrade
brew install scala

所以,这对我有帮助。

关于scala - Scala因代码完成库而崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41009292/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com