Mac M1 Homebrew Perl Carton Net::SSLeay 正在以不安全的方式加载 libcrypto

Ryu*_*uro 6 perl homebrew openssl apple-m1

我正在尝试使用 Carton 安装 Net::SSLeay。安装失败并显示此消息

Configuring Net-SSLeay-1.90 Running Makefile.PL Do you want to run external tests? 
These tests *will* *fail* if you do not have network connectivity. [n] n 
*** Found LibreSSL-2.8.3 installed in /usr 
*** Be sure to use the same compiler and options to compile your OpenSSL, perl, and Net::SSLeay. Mixing and matching compilers is not supported. 
Checking if your kit is complete... Looks good 
WARNING: /opt/homebrew/Cellar/perl/5.32.1_1/bin/perl is loading libcrypto in an unsafe way -> N/A
Run Code Online (Sandbox Code Playgroud)

我已经用系统 perl、brew perl 和多个 perlbrew perls 尝试过这个。Google 提出了一个使用 x86_64 架构构建自制程序的临时解决方案。这确实解决了 libcrypto 错误,但给了我一系列完全不同的问题,包括 mysql 不再运行。

我尝试过的其他“解决方案”是符号链接 libssl 和 libcrypto,正如许多其他帖子所建议的那样,但遗憾的是都没有成功。

有什么想法可以解决这个问题或解决这个问题,而无需将所有brew软件包重新安装为x86_64吗?

快速解决方法

如果您正在寻找快速解决方法,请按照以下步骤操作。

  1. 运行carton bundle以创建供应商缓存目录。
  2. Go to cached tarball 'cache/authors/id/C/CH/CHRISN/' and unpack tar -xvzf Net-SSLeay-1.90.tar.gz
  3. Edit Makefile.PL, change my $prefix = find_openssl_prefix(); to my $prefix = '/opt/homebrew/opt/openssl@1.1'; ** adjust to your openssl location.
  4. Save and create new tarball tar -czvf Net-SSLeay-1.90.tar.gz Net-SSLeay-1.90
  5. Run carton install --cached to use the altered version

Hope this helps anyone in search of workaround

Eth*_*her 8

您可以通过两步解决这个问题:


Ade*_*Ade 5

在蒙特利更新之后,这个问题在 x86_64 架构上也再次出现问题,但只需符号链接你最新的 openssl (无论它在哪里,取决于你如何安装它)似乎就可以解决这个问题。例子:

$ export OPENSSL_PREFIX=[find your openssl installation]
$ sudo ln -s $OPENSSL_PREFIX/lib/libssl.dylib /usr/local/lib/
$ sudo ln -s $OPENSSL_PREFIX/lib/libcrypto.dylib /usr/local/lib/
Run Code Online (Sandbox Code Playgroud)