Composer安装错误-实际启用时需要ext_curl [英] Composer install error - requires ext_curl when it's actually enabled

查看:251
本文介绍了Composer安装错误-实际启用时需要ext_curl的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试通过Composer安装Facebook PHP SDK.这就是我得到的

I'm trying to install Facebook PHP SDK with Composer. This is what I get

$ composer install
Loading composer repositories with package information
Installing dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

    Problem 1
        - Installation request for facebook/php-sdk dev-master -> satisfiable by facebook/php-sdk[dev-master].
        - facebook/php-sdk dev-master requires ext-curl * -> the requested PHP extension curl is missing from your system.

问题是,我启用了curl扩展(在php.ini中未注释).当我运行phpinfo()时,它表示已启用. 我唯一的线索是,当我运行$ php -m时,缺少'curl'行,但是我不知道该怎么办.

Problem is, I have curl extension enabled (uncommented in php.ini). When I run phpinfo(), it says it's enabled. Only clue I have is that when I run $ php -m, 'curl' line is missing but I don't know what to do about it.

我在Win8上安装了wamp 2.4,并且正在cmd.exe中运行作曲家.

I have wamp 2.4 on Win8 and I'm running composer in cmd.exe.

推荐答案

这是由于您的系统中未安装库php5-curl造成的,

This is caused because you don't have a library php5-curl installed in your system,

在Ubuntu上,只需简单地运行下面的代码,就您在Xamp上的情况而言,请查看Xamp文档

On Ubuntu its just simple run the line code below, in your case on Xamp take a look in Xamp documentation

sudo apt-get install php5-curl

对于使用php7.0的任何人

For anyone who uses php7.0

sudo apt-get install php7.0-curl

对于那些使用php7.1的人

For those who uses php7.1

sudo apt-get install php7.1-curl

对于那些使用php7.2的人

For those who use php7.2

sudo apt-get install php7.2-curl

或者只是运行以下命令以按照您的版本进行安装:

Or simply run below command to install by your version:

sudo apt-get install php-curl

这篇关于Composer安装错误-实际启用时需要ext_curl的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆