I'm trying to install Net::SSLeay with Carton. The installation fails with this message
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
I've tried this with system perl, brew perl and multiple perlbrew perls. Google came up with a temp solution to build homebrew using x86_64 architecture. This did work for the libcrypto error, but gave me a whole different set of issues including mysql not running anymore.
Other "solutions" that I've tried are symlinking libssl & libcrypto as suggested by numerous other posts, all sadly without success.
Any ideas how to fix this or work around this without having to reinstall all brew packages as x86_64 ?
Quick Workaround
If you are looking for a quick workaround follow these steps.
- Run
carton bundleto create a vendor cache directory. - Go to cached tarball 'cache/authors/id/C/CH/CHRISN/' and unpack
tar -xvzf Net-SSLeay-1.90.tar.gz - Edit Makefile.PL, change
my $prefix = find_openssl_prefix();tomy $prefix = '/opt/homebrew/opt/openssl@1.1';** adjust to your openssl location. - Save and create new tarball
tar -czvf Net-SSLeay-1.90.tar.gz Net-SSLeay-1.90 - Run
carton install --cachedto use the altered version
Hope this helps anyone in search of workaround