为什么 Raku 在 MacOS Catalina 上使用 Cro 时会因“Abort trap: 6”而崩溃?

Mik*_*kov 9 openssl rakudo cro raku

我正在使用 macOS Catalina 并尝试执行一个简单的命令raku -e "use Cro::HTTP::Route"。我将[1] 19228 abort raku在 Zsh shell 或Abort trap: 6Bash shell 中收到一条消息。使用 OpenSSL 模块(如raku -e "use OpenSSL::Stack".

> raku -v
This is Rakudo version 2019.11-268-g0e4f8351e built on MoarVM version 2019.11-92-gd7b6855d3 implementing Perl 6.d.

> zef info OpenSSL
OpenSSL:ver<0.1.22>:auth<github:sergot>

> zef info cro
cro:ver<0.8.2>
Run Code Online (Sandbox Code Playgroud)

Mik*_*kov 13

这是因为 OpenSSL 模块在默认路径中找不到OpenSSL_version_num函数libssl.dylib并崩溃。

你需要修复它安装openssl通过brew,并作出链接libssl.dylib库:

brew install openssl
ln -s /usr/local/opt/openssl/lib/libssl.dylib /usr/local/lib/
Run Code Online (Sandbox Code Playgroud)