NoSuchMethodError:Matcher.quoteReplacement在Ubuntu上执行sbt期间

NoSuchMethodError:Matcher.quoteReplacement在Ubuntu上执行sbt期间,ubuntu,sbt,Ubuntu,Sbt,我根据建议从Typesafe存储库安装了sbt: wget sudo dpkg-i repo-deb-build-0002.deb sudoapt获得更新 sudo-apt-get-install-sbt 当我运行sbt时,我面临以下错误: ~/fun/sbt$ sbt Starting sbt: invoke with -help for other options java.lang.NoSuchMethodError: method java.util.regex.Matcher.qu

我根据建议从Typesafe存储库安装了
sbt

  • wget
  • sudo dpkg-i repo-deb-build-0002.deb
  • sudoapt获得更新
  • sudo-apt-get-install-sbt
当我运行
sbt
时,我面临以下错误:

~/fun/sbt$ sbt
Starting sbt: invoke with -help for other options
java.lang.NoSuchMethodError: method java.util.regex.Matcher.quoteReplacement with signature (Ljava.lang.String;)Ljava.lang.String; was not found.
   at xsbt.boot.ConfigurationParser$.substituteVariables(ConfigurationParser.scala:22)
   at xsbt.boot.ConfigurationParser.id(ConfigurationParser.scala:106)
   at xsbt.boot.ConfigurationParser$$anonfun$3.apply(ConfigurationParser.scala:66)
   at xsbt.boot.ConfigurationParser$$anonfun$processSection$1.apply(ConfigurationParser.scala:101)
   at xsbt.boot.ConfigurationParser.process(ConfigurationParser.scala:102)
   at xsbt.boot.ConfigurationParser.processSection(ConfigurationParser.scala:101)
   at xsbt.boot.ConfigurationParser.xsbt$boot$ConfigurationParser$$apply(ConfigurationParser.scala:60)
   at xsbt.boot.ConfigurationParser$$anonfun$apply$3.apply(ConfigurationParser.scala:52)
   at xsbt.boot.Using$.withResource(Using.scala:11)
   at xsbt.boot.Using$.apply(Using.scala:10)
   at xsbt.boot.Configuration$$anonfun$parse$1.apply(Configuration.scala:15)
   at xsbt.boot.Using$.withResource(Using.scala:11)
   at xsbt.boot.Using$.apply(Using.scala:10)
   at xsbt.boot.Configuration$.parse$fcb646c(Configuration.scala:15)
   at xsbt.boot.Launch$.apply(Launch.scala:14)
   at xsbt.boot.Boot$.runImpl(Boot.scala:25)
   at xsbt.boot.Boot$.main(Boot.scala:15)
   at xsbt.boot.Boot.main(Boot.scala)
Error during sbt execution: java.lang.NoSuchMethodError: method java.util.regex.Matcher.quoteReplacement with signature (Ljava.lang.String;)Ljava.lang.String; was not found.

我能想到的sbt以这种方式失败的唯一原因是一个旧的Java版本。SBT需要Java 6或更高版本。运行
java-version
了解您的版本