分享web开发知识

注册/登录|最近发布|今日推荐

主页 IT知识网页技术软件开发前端开发代码编程运营维护技术分享教程案例
当前位置:首页 > 网页技术

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

发布时间:2023-09-06 02:04责任编辑:彭小芳关键词:PHP

 问题描述:

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

[root@localhost src]# curl -sS https://getcomposer.org/installer | phpSome 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 --iniConfiguration File (php.ini) Path: /usr/local/php-7.1.17/libLoaded 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 --iniConfiguration File (php.ini) Path: /usr/local/php-7.1.17/libLoaded Configuration File: ????????/usr/local/php-7.1.17/lib/php.iniScan for additional .ini files in: (none)Additional .ini files parsed: ?????(none)

再次安装composer 正常。

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

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

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

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

知识推荐

我的编程学习网——分享web前端后端开发技术知识。 垃圾信息处理邮箱 tousu563@163.com 网站地图
icp备案号 闽ICP备2023006418号-8 不良信息举报平台 互联网安全管理备案 Copyright 2023 www.wodecom.cn All Rights Reserved