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

前端 未结 15 948
遇见更好的自我
遇见更好的自我 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:32

    According to https://github.com/composer/composer/issues/2119 you could extend your local composer.json to state that it provides the extension (which it doesn't really do - that's why you shouldn't publicly publish your package, only use it internally).

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

    Not sure why an answer with Linux commands would get so many up votes for a Windows related question, but anyway...

    If phpinfo() shows Curl as enabled, yet php -m does NOT, it means that you probably have a php-cli.ini too. run php -i and see which ini file loaded. If it's different, diff it and reflect and differences in the CLI ini file. Then you should be good to go.

    Btw download and use Git Bash instead of cmd.exe!

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

    on php7 run for example:

    > sudo apt-get install php-curl
    > sudo apt-get install php-mbstring
    

    for every missing extension. Then:

    > sudo apt-get update
    

    and finally (in the project's root folder):

    > composer install
    
    0 讨论(0)
  • 2020-12-04 08:37

    if use wamp go to:

    wamp\bin\php\php.5.x.x\php.ini find: ;extension=php_curl.dll remove (;)

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

    In my case I moved from PHP5 to PHP7 and I ve got this error, Simply go to your /bin/php/php7/php.ini , then uncomment extension=php_curl.dll and restart your server, re-run your composer install.

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

    This worked for me: http://ubuntuforums.org/showthread.php?t=1519176

    After installing composer using the command curl -sS https://getcomposer.org/installer | php just run a sudo apt-get update then reinstall curl with sudo apt-get install php5-curl. Then composer's installation process should work so you can finally run php composer.phar install to get the dependencies listed in your composer.json file.

    0 讨论(0)
提交回复
热议问题