【问题标题】:Can't compile anything with asdf due to error in Digest::SHA module由于 Digest::SHA 模块中的错误,无法使用 asdf 编译任何内容
【发布时间】:2022-01-07 20:50:09
【问题描述】:

尝试在我的 MacOS 上安装 ruby​​ 3.0.3,但在启动时出现此错误:

bash$ asdf install ruby 3.0.3
"$errmsg" is not exported by the Digest::SHA module
Can't continue after import errors at /usr/local/bin/shasum line 24.
BEGIN failed--compilation aborted at /usr/local/bin/shasum line 24.

编译继续进行,但在稍后的状态下失败。

【问题讨论】:

    标签: ruby homebrew asdf asdf-vm


    【解决方案1】:

    试图找出问题所在并检查 /usr/local/bin/shasum 命令:

    bash$ echo "test" | shasum --algorithm 256
    "$errmsg" is not exported by the Digest::SHA module
    Can't continue after import errors at /usr/local/bin/shasum line 24.
    BEGIN failed--compilation aborted at /usr/local/bin/shasum line 24.
    

    shasum 出了点问题。弄清楚它是如何安装的:

    bash$ ls -l /usr/local/bin/shasum
    lrwxr-xr-x  1 user  admin  32 Dec  1 09:28 /usr/local/bin/shasum -> ../Cellar/perl/5.34.0/bin/shasum
    

    这告诉我,perl 是通过自制软件安装的,但出了点问题。所以我尝试重新安装 perl 并解决了问题:

    bash$ brew reinstall perl
    ==> Downloading https://ghcr.io/v2/homebrew/core/perl/manifests/5.34.0
    ...
    

    现在很好:

    echo "test" | shasum --algorithm 256
    f2ca1bb6c7e907d06dafe4687e579fce76b37e4e93b7605022da52e6ccc26fd2  -
    

    【讨论】:

      猜你喜欢
      • 2015-12-29
      • 1970-01-01
      • 2020-03-17
      • 2021-01-12
      • 2012-11-19
      • 1970-01-01
      • 2022-07-09
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多