tokuhirom / plenv

Perl binary manager
Other
516 stars 71 forks source link

Installing Perl Fails on macOS #147

Open sanssecours opened 6 years ago

sanssecours commented 6 years ago

👋 Hi,

thank you for providing this very useful tool 💖. The bug report below contains an issue I noticed about one week ago.

Steps to Reproduce the Problem

brew install plenv
brew install perl-build
eval "$(plenv init -)"
plenv install 5.28.0

Expected Result

The last command should install the latest version of Perl.

Actual Result

The command prints the following error message:

Installing 5.28.0 as 5.28.0
perl -- /usr/local/Cellar/perl-build/1.24/libexec/bin/perl-build --symlink-devel-executables --build-dir /Users/travis/.plenv/build/1534929383.6094/ --tarball-dir /Users/travis/.plenv/cache/ -Dversiononly 5.28.0 /Users/travis/.plenv/versions/5.28.0
Fetching 5.28.0 as /Users/travis/.plenv/cache/perl-5.28.0.tar.gz (https://cpan.metacpan.org/authors/id/X/XS/XSAWYERX/perl-5.28.0.tar.gz)
Cannot get file from https://cpan.metacpan.org/authors/id/X/XS/XSAWYERX/perl-5.28.0.tar.gz: 599 Internal Exception at /usr/local/Cellar/perl-build/1.24/libexec/lib/perl5/Perl/Build.pm line 142.
ABORT

. I created a repo that reproduces the problem here.

skaji commented 6 years ago

Could you show us the output of the following command?

plenv install -l
sanssecours commented 6 years ago

Thank you for the quick reply. The command

plenv install --list

prints the following output on Travis:

Available versions:
599 Internal Exception, https://fastapi.metacpan.org/v1/release/_search, Can't verify SSL peers without knowing which Certificate Authorities to trust  This problem can be fixed by either setting the PERL_LWP_SSL_CA_FILE envirionment variable or by installing the Mozilla::CA module.  To disable verification of SSL peers set the PERL_LWP_SSL_VERIFY_HOSTNAME envirionment variable to 0.  If you do this you can't be sure that you communicate with the expected peer.

. On my local machine it prints the following error message:

Available versions:
599 Internal Exception, https://fastapi.metacpan.org/v1/release/_search, Can't connect to fastapi.metacpan.org:443  LWP::Protocol::https::Socket: SSL connect attempt failed error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version at /Library/Perl/5.18/LWP/Protocol/http.pm line 47.

.

skaji commented 6 years ago

@sanssecours Thanks. The original issue is https://github.com/miyagawa/HTTP-Tinyish/issues/14

skaji commented 6 years ago

Oh, the second error (on your local machine) is different. It means your Net::SSLeay (openssl) does not support TLSv1.2.

skaji commented 6 years ago

miyagawa/HTTP-Tinyish#14 has been fixed. Please upgrade perl-build to https://github.com/tokuhirom/Perl-Build/commit/92222dbe92b0ad0c518a79d29109e5e2925cc3ca.

sanssecours commented 6 years ago

Thank you for the update. I installed the latest version of perl-build via

brew install perl-build --HEAD

. Unfortunately Travis still reports the same problem.

ispyhumanfly commented 4 years ago

Thank you for the update. I installed the latest version of perl-build via

brew install perl-build --HEAD

. Unfortunately Travis still reports the same problem.

I believe that perl-build should be a dependency of plenv for brew. This is the same behavior for "rbenv", it depends on "ruby-build".

I made a pull request to homebrew-core for plenv, adding this, and tested with great success...

I'm new to the tool and am looking to help is all.