Warning while installing Composer on a Mac

僤鯓⒐⒋嵵緔 提交于 2019-11-28 14:16:19

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
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!