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

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

问题描述

我尝试使用Composer安装Facebook PHP SDK。这是我得到的

  $ composer install 
加载包信息的composer存储库
安装依赖项require-dev)
您的需求无法解析为一组可安装的软件包。

问题1
- 安装请求facebook / php-sdk dev-master - >满足于facebook / php-sdk [dev-master]。
- facebook / php-sdk dev-master需要ext-curl * - >您的系统中缺少所请求的PHP扩展程序curl。问题是,我已启用curl扩展(在php.ini中取消注释)。



<当我运行 phpinfo()时,它说它已启用。
只有一个提示,当我运行 $ php -m 时,'curl'行丢失,但我不知道该怎么办。 / p>

我在Win8上有wamp 2.4,我正在cmd.exe中运行composer。

解决方案

这是因为您的系统中没有安装库php5-curl,



在Ubuntu上只是简单的运行下面的代码,在Xamp中查看Xamp文档

  sudo apt-get install php5-curl 

使用php7.0的任何人

  sudo apt-get install php7.0-curl 


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.

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.

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

解决方案

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

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

For anyone who uses php7.0

sudo apt-get install php7.0-curl

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

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