问题
My Mac has OpenSSL version 1.0.1t, but when I tried to install Composer, I got an error:
Some settings on your machine may cause stability issues with Composer. If you encounter issues, try to change the following:
The OpenSSL library (0.9.8zc) used by PHP does not support TLSv1.2 or TLSv1.1. If possible you should upgrade OpenSSL to version 1.0.1 or above.
How can I resolve this possible stability issue?
回答1:
The version of the OpenSSL binary that you have installed doesn't matter, the important detail is the version that PHP was compiled with.
It sounds like you are using the version of PHP shipped with OS X; you can confirm this by using the command php -i | grep OpenSSL
and looking for this output:
OpenSSL support => enabled
OpenSSL Library Version => OpenSSL 0.9.8zh 14 Jan 2016
OpenSSL Header Version => OpenSSL 0.9.8zc 19 Mar 2015
OpenSSL support => enabled
You'll need to install a newer version of PHP yourself instead of using the shipped version. I'd suggest a package management system like MacPorts or HomeBrew to install anything like this.
I have no experience with HomeBrew, but MacPorts will automatically fetch the latest versions of all the libraries and dependencies it needs, and not use the built-in ones. Initial setup is a pain and involves installing XCode, but once that's done it's easy to install all the software you need, and keep it up to date. My output, for example, looks like this:
SSL Version => OpenSSL/1.0.2h
OpenSSL support => enabled
OpenSSL Library Version => OpenSSL 1.0.2h 3 May 2016
OpenSSL Header Version => OpenSSL 1.0.2h 3 May 2016
OpenSSL support => enabled
来源:https://stackoverflow.com/questions/37123242/warning-while-installing-composer-on-a-mac