【问题标题】:SBT fails to launch on ARM64 Apple silicon with error Could not find required component 'xsbti'SBT 无法在 ARM64 Apple 芯片上启动,出现错误找不到所需的组件“xsbti”
【发布时间】:2021-07-07 22:11:48
【问题描述】:

当我使用命令启动 SBT 1.5 时,该命令又会为项目启动 0.13 版

❯ sbt -v
[sbt_options] declare -a sbt_options='()'
[process_args] java_version = '8'
# Executing command line:
java
-Dfile.encoding=UTF-8
-Xms1024m
-Xmx1024m
-Xss4M
-XX:ReservedCodeCacheSize=128m
-jar
/opt/homebrew/Cellar/sbt/1.5.0/libexec/bin/sbt-launch.jar

[info] Loading global plugins from /Users/viswanath/.sbt/0.13/plugins
[info] Updating {file:/Users/viswanath/.sbt/0.13/plugins/}global-plugins...
[info] Resolving org.fusesource.jansi#jansi;1.4 ...
[info] Done updating.

我收到以下错误

[error] (compile:compileIncremental) sbt.InvalidComponent: Could not find required component 'xsbti'

在我的 MacBookPro 上,采用 ARM64 架构的 M1 处理器(又名 Apple 芯片)。有关如何解决此问题的任何线索?

注意:捆绑的 SBT 在 IntelliJ 上运行良好

【问题讨论】:

    标签: sbt arm64 apple-silicon


    【解决方案1】:

    尝试使用SDKMAN安装

    curl -s "https://get.sdkman.io" | bash
    
    source "$HOME/.sdkman/bin/sdkman-init.sh"
    
    sdk install java
    
    sdk install sbt
    
    sbt compile
    
    【解决方案2】:

    将项目的 SBT 版本提高到 1.5.0,问题就消失了。 See this githib issue for more information.

    或者,check this workaround 在 SBT 1.5.0 上以交互模式启动 SBT。

    sbt -Dsbt.boot.directory=/tmp/boot1 -Dsbt.launcher.coursier=false
    

    【讨论】:

      猜你喜欢
      • 2018-11-02
      • 2015-10-21
      • 1970-01-01
      • 2022-01-22
      • 2022-08-16
      • 2017-11-06
      • 2021-09-13
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多