问题描述
我今天遇到了 SBT 错误.最好使用 sbt sbt-version
命令显示:
I have run into an ERROR with SBT today. It can best be shown with the sbt sbt-version
command:
2017 年 5 月 29 日运行:
Run on 5/29/17:
eric@linux-x2vq:~$ sbt sbt-version
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option
MaxPermSize=256M; support was removed in 8.0
[info] Set current project to eric (in build file:/home/eric/)
[info] 0.13.13
2017 年 6 月 1 日运行:
Run on 6/1/17:
eric@linux-x2vq:~$ sbt sbt-version
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option
MaxPermSize=256M; support was removed in 8.0
[ERROR] Failed to construct terminal; falling back to unsupported
java.lang.NumberFormatException: For input string: "0x100"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
at java.lang.Integer.parseInt(Integer.java:580)
at java.lang.Integer.valueOf(Integer.java:766)
at jline.internal.InfoCmp.parseInfoCmp(InfoCmp.java:59)
at jline.UnixTerminal.parseInfoCmp(UnixTerminal.java:233)
at jline.UnixTerminal.<init>(UnixTerminal.java:64)
at jline.UnixTerminal.<init>(UnixTerminal.java:49)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at java.lang.Class.newInstance(Class.java:442)
at jline.TerminalFactory.getFlavor(TerminalFactory.java:209)
at jline.TerminalFactory.create(TerminalFactory.java:100)
at jline.TerminalFactory.get(TerminalFactory.java:184)
at jline.TerminalFactory.get(TerminalFactory.java:190)
at sbt.ConsoleLogger$.ansiSupported(ConsoleLogger.scala:123)
at sbt.ConsoleLogger$.<init>(ConsoleLogger.scala:117)
at sbt.ConsoleLogger$.<clinit>(ConsoleLogger.scala)
at sbt.GlobalLogging$.initial(GlobalLogging.scala:43)
at sbt.StandardMain$.initialGlobalLogging(Main.scala:64)
at sbt.StandardMain$.initialState(Main.scala:73)
at sbt.xMain.run(Main.scala:29)
at xsbt.boot.Launch$$anonfun$run$1.apply(Launch.scala:109)
at xsbt.boot.Launch$.withContextLoader(Launch.scala:128)
at xsbt.boot.Launch$.run(Launch.scala:109)
at xsbt.boot.Launch$$anonfun$apply$1.apply(Launch.scala:35)
at xsbt.boot.Launch$.launch(Launch.scala:117)
at xsbt.boot.Launch$.apply(Launch.scala:18)
at xsbt.boot.Boot$.runImpl(Boot.scala:41)
at xsbt.boot.Boot$.main(Boot.scala:17)
at xsbt.boot.Boot.main(Boot.scala)
[info] Set current project to eric (in build file:/home/eric/)
[info] 0.13.13
我的 SBT 或 Java 设置没有任何变化(据我所知).
No changes (that I know of) to either my SBT or Java setup.
关于可能导致此错误的原因或如何修复错误的任何想法?
Any ideas on what might be causing this or how to fix the error?
谢谢!
推荐答案
我找到了导致此问题的包:ncurses
.我将 ncurses
降级到 ncurses-6.0+20170429-1
版本(我使用的是 Arch Linux)并且 SBT 启动得很好.
I found the package which causes this issue: ncurses
. I downgraded ncurses
to version ncurses-6.0+20170429-1
(I am using Arch Linux) and SBT starts just fine.
Arch Linux 的步骤:
Steps for Arch Linux:
cd /var/cache/pacman/pkg
sudo pacman -U ncurses-6.0+20170429-1-x86_64.pkg.tar.xz # or some other older version
Mac 的步骤:参见 https://github.com/jline/jline2/issues/281
Steps for Mac: see https://github.com/jline/jline2/issues/281
我认为这个问题是在 ncurses 版本 20170506 中引入的,请参阅:http:///invisible-island.net/ncurses/NEWS.html#index-t20170506
I think this issue was introduced with ncurses version 20170506, see: http://invisible-island.net/ncurses/NEWS.html#index-t20170506
+ modify tic/infocmp display of numeric values to use hexadecimal when
they are "close" to a power of two, making the result more readable.
我在 SBT 问题跟踪器上提交了一个问题:https://github.com/sbt/sbt/issues/3240
I filed an issue on the SBT issue tracker: https://github.com/sbt/sbt/issues/3240
编辑:SBT 0.13.16 版包含针对此问题的修复.
SBT version 0.13.16 includes the fix for this problem.
这篇关于SBT 错误:“构建终端失败;退回到不受支持的状态……"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!