Composer install error - requires ext_curl when it's actually enabled

前端 未结 15 949
遇见更好的自我
遇见更好的自我 2020-12-04 07:50

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

$ composer install
Loading composer repositories with package information
Installin         


        
相关标签:
15条回答
  • 2020-12-04 08:40

    I ran into a similar issue when trying to get composer to install some dependencies. It turns out the .dll my version of Wamp came with had a conflict, I am guessing, with 64 bit Windows.

    This url has fixed curl dlls: http://www.anindya.com/php-5-4-3-and-php-5-3-13-x64-64-bit-for-windows/

    Scroll down to the section that says: Fixed Curl Extensions.

    I downloaded "php_curl-5.4.3-VC9-x64.zip". I just overwrote the dll inside the wamp/bin/php/php5.4.3/ext directory with the dll that was in the zip file and composer worked again.

    I am running 64 bit Windows 8.

    Hope this helps.

    0 讨论(0)
  • 2020-12-04 08:41

    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
    

    For those who uses php7.1

    sudo apt-get install php7.1-curl
    

    For those who use php7.2

    sudo apt-get install php7.2-curl
    

    For those who use php7.3

    sudo apt-get install php7.3-curl
    

    Or simply run below command to install by your version:

    sudo apt-get install php-curl
    
    0 讨论(0)
  • 2020-12-04 08:42

    I have Archlinux with php 7.2, which has Curl integrated, so no amount of configuration voodoo would make Composer see ext-curl, that PHP could see and work with happily. Work around is to use Composer with --ignore-platform-reqs.

    eg composer update --ignore-platform-reqs

    Reference = https://github.com/composer/composer/issues/1426

    0 讨论(0)
  • 2020-12-04 08:43

    try install php5-curl by using below snippet.

    sudo apt-get install php5-curl
    

    if it won't work try below code i m sure it will work fine.

    sudo apt-get install php-curl
    

    for me it worked... all the best :)

    0 讨论(0)
  • 2020-12-04 08:45

    I ran into the same issue trying to install Dropbox SDK.

    CURL was indeed enabled on my system but this meant by the php.ini in the wamp\bin\apache folder.

    I simply had to manually edit the php.ini situated in wamp\bin\php, uncomment the extension=php_curl.dll line, restart Wamp and it worked perfectly.

    Why there are those 2 php.ini and only one is used is still a mystery for me...

    Hope it's helpul to someone!

    0 讨论(0)
  • 2020-12-04 08:46

    Enable in php 7 try below command

    sudo apt-get install php7.0-curl
    
    0 讨论(0)
提交回复
热议问题