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

人气:744 发布:2022-10-16 标签: perl openssl apple-m1 homebrew

问题描述

我正在尝试安装Net::SSLeay with Carton。 安装失败,并显示以下消息

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

我已经在System Perl、BREW Perl和多个Perlbrew Perl上尝试过。 谷歌提出了一个使用x86_64架构构建自制软件的临时解决方案。 这确实解决了libcrypto错误,但给我带来了一组完全不同的问题,包括MySQL不再运行。

我尝试过的其他解决方案都像许多其他帖子所建议的那样,使用符号链接libssl&;libcrypto,遗憾的是都没有成功。

有什么想法可以修复或解决此问题,而不必重新安装所有BREW程序包作为x86_64?

快速解决方法

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

运行carton bundle创建供应商缓存目录。 转到缓存的tarball‘缓存/作者/id/C/CH/CHRISN/’并解压缩tar -xvzf Net-SSLeay-1.90.tar.gz 编辑Makefile.PL,将my $prefix = find_openssl_prefix();更改为 my $prefix = '/opt/homebrew/opt/openssl@1.1';**根据您的OpenSSL位置进行调整。 保存并创建新的tarballtar -czvf Net-SSLeay-1.90.tar.gz Net-SSLeay-1.90 运行carton install --cached以使用更改后的版本

希望这对任何正在寻找解决办法的人都有帮助

推荐答案

您可以分两步解决:

至少升级到7.58版本(例如cpanm ExtUtils::MakeMaker) 通过macports(sudo port install openssl)或homebrew(brew install --cask openssl)安装openssl

908