码迷,mamicode.com
首页 > Web开发 > 详细

PHP composer-setup安装遇到的openssl extension is missing

时间:2018-07-14 18:44:52      阅读:188      评论:0      收藏:0      [点我收藏+]

标签:parse   ini   config   配置   The   mis   local   miss   ssl   

 问题描述:

     安装完成php-7.1.17后,安装composer出现以下错误

[root@localhost src]# 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

排查过程中发现php 配置文件的问题,没有加载到php.ini文件

[root@localhost php]# php --ini
Configuration File (php.ini) Path: /usr/local/php-7.1.17/lib
Loaded Configuration File:         (none)
Scan for additional .ini files in: (none)
Additional .ini files parsed:      (none)

 创建软链

[root@localhost php]# ln -s /home/sc/php/php7-9026.ini /usr/local/php/lib/php.ini

 找到php.ini文件

[root@localhost lib]# php --ini
Configuration File (php.ini) Path: /usr/local/php-7.1.17/lib
Loaded Configuration File:         /usr/local/php-7.1.17/lib/php.ini
Scan for additional .ini files in: (none)
Additional .ini files parsed:      (none)

再次安装composer 正常。

curl -sS https://getcomposer.org/installer | php
mv composer.phar /usr/local/bin/composer

 通过phpinfo 查看是已经加载到了openssl,但是没有找到php.ini 导致通过绝对路径时没有加载到模块。

PHP composer-setup安装遇到的openssl extension is missing

标签:parse   ini   config   配置   The   mis   local   miss   ssl   

原文地址:https://www.cnblogs.com/xzlive/p/9310527.html

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