码迷,mamicode.com
首页 > 系统相关 > 详细

Linux安装composer遇到的坑

时间:2019-05-10 14:50:55      阅读:942      评论:0      收藏:0      [点我收藏+]

标签:install   configure   cal   nss   dev   pil   .so   should   命令   

红色

执行命令: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

Linux安装composer遇到的坑

标签:install   configure   cal   nss   dev   pil   .so   should   命令   

原文地址:https://www.cnblogs.com/greycdoer0/p/10844197.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!