The openssl extension is missing, which means that secure HTTPS transfers are impossible

执行命令:curl -sS https://getcomposer.org/installer | php
报错如下
Some settings on your machine make Composer unable to work properly.
Make sure that you fix the issues listed below and run this script again:

The openssl extension is missing, which means that secure HTTPS transfers are impossible.
If possible you should enable it or recompile php with --with-openssl

没有openssl扩展
cd php7.0/ext/openssl // 进入到openssl文件
phpize // 运行phpize

编译和安装
./configure --with-openssl --with-php-config=/usr/local/php/bin/php-config // 编译和安装
遇到报错:
configure: error: Cannot find OpenSSL‘s <evp.h>

缺少openssl相关的库,直接安装即可yum install openssl openssl-devel遇到“configure: error: mcrypt.h not found. Please reinstall libmcrypt”提示比较明确,缺少libmcrypt,直接安装即可yum install?libmcrypt最后执行 make && make install进入最后提示的目录 cp openssl.so /usr/local/php/include/php/ext找到php.ini,在最后面添加如下内容: extension=openssl.so重启 后查看扩展: php -m

相关文章
相关标签/搜索
每日一句
    每一个你不满意的现在,都有一个你没有努力的曾经。
公众号推荐
   一个历史类的公众号,欢迎关注
一两拨千金