Guzzle: composer fails with "requires ext-curl" when cURL is installed

Created on 24 Feb 2014  路  30Comments  路  Source: guzzle/guzzle

I'm 100% positive I have curl installed - I use it often, and have for many hears. That said, when I run composer from the Tumblr PHP API (which has guzzle as a dependency), it fails with:

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
    - guzzle/guzzle v3.8.1 requires ext-curl * -> the requested PHP extension curl is missing from your system.
    - guzzle/guzzle v3.8.0 requires ext-curl * -> the requested PHP extension curl is missing from your system.
    - guzzle/guzzle v3.7.4 requires ext-curl * -> the requested PHP extension curl is missing from your system.
    - guzzle/guzzle v3.7.3 requires ext-curl * -> the requested PHP extension curl is missing from your system.
    - guzzle/guzzle v3.7.2 requires ext-curl * -> the requested PHP extension curl is missing from your system.
    - guzzle/guzzle v3.7.1 requires ext-curl * -> the requested PHP extension curl is missing from your system.
    - guzzle/guzzle v3.7.0 requires ext-curl * -> the requested PHP extension curl is missing from your system.
    - guzzle/guzzle v3.6.0 requires ext-curl * -> the requested PHP extension curl is missing from your system.
    - guzzle/guzzle v3.5.0 requires ext-curl * -> the requested PHP extension curl is missing from your system.
    - guzzle/guzzle v3.4.3 requires ext-curl * -> the requested PHP extension curl is missing from your system.
    - guzzle/guzzle v3.4.2 requires ext-curl * -> the requested PHP extension curl is missing from your system.
    - guzzle/guzzle v3.4.1 requires ext-curl * -> the requested PHP extension curl is missing from your system.
    - guzzle/guzzle v3.4.0 requires ext-curl * -> the requested PHP extension curl is missing from your system.
    - guzzle/guzzle v3.3.1 requires ext-curl * -> the requested PHP extension curl is missing from your system.
    - guzzle/guzzle v3.3.0 requires ext-curl * -> the requested PHP extension curl is missing from your system.
    - guzzle/guzzle v3.2.0 requires ext-curl * -> the requested PHP extension curl is missing from your system.
    - guzzle/guzzle v3.1.2 requires ext-curl * -> the requested PHP extension curl is missing from your system.
    - guzzle/guzzle v3.1.1 requires ext-curl * -> the requested PHP extension curl is missing from your system.
    - guzzle/guzzle v3.1.0 requires ext-curl * -> the requested PHP extension curl is missing from your system.
    - Installation request for guzzle/guzzle >=3.1.0,<4 -> satisfiable by guzzle/guzzle[v3.1.0, v3.1.1, v3.1.2, v3.2.0, v3.3.0, v3.3.1, v3.4.0, v3.4.1, v3.4.2, v3.4.3, v3.5.0, v3.6.0, v3.7.0, v3.7.1, v3.7.2, v3.7.3, v3.7.4, v3.8.0, v3.8.1].

WAMP, Windows 8.1

Is this a known issue, or am I missing something?

TYIA

Most helpful comment

apt-get install php5-curl

All 30 comments

This sounds like a composer issue and not specific to Guzzle. I think you'll get better support for this by opening the ticket on composer/composer.

I assume you're running this from the command line? What's the output of var_export(extension_loaded('curl'));?

  • First, it's not a problem of Guzzle, it's more like Composer.
  • Second did you check the php.ini used by CLI not by webserver?
  • IIRC that command tell you where to look for that file used by CLI:
$ php --ini

@mtdowling @stloyd thanks both for the quick reply.

curl was loaded for web server but not cli, per @stloyd. thanks both, sorry for the confusion.

apt-get install php5-curl

apt-get install php5-curl ... thank you Drakun

sudo apt-get install php5-curl worked for me! Thanks a million.

If you happen to be running on Codio, you must run this command:

parts install php5-curl

@DRAKUN Perfect! Thanks!

Excelente !! Funciona. Gracias :)

Thank you so much @drakun.. It solve my problem.

Thanks you @DRAKUN

if you use php7 then use apt-get install php-curl

Thanks @ruhulsw !!

if you are using php 5.6 then

apt-get install php5.6-curl

if you are using php7.1 then it should apt-get install php7.1-curl

For anyone who uses php7.0

sudo apt-get install php7.0-curl

For windows with PHP7:
find ;extension=php_curl.dll in your php.ini and remove the ";".

Thanks @ruhulsw @mizanur-rahman

sudo apt-get install php-curl
worked for me! for php 7.1

Just sudo apt-get install php-curl resolved my problem.

sudo apt-get install php-curl works for me :)

First: apt-get update
After: apt-get install php-curl

PHP 7.0:     sudo apt-get install php-curl
PHP 5.6:     sudo apt-get install php5.6-curl
PHP 5.5:     sudo apt-get install php5.5-curl

I had similar issue on windows and it turned out I needed to add following line in my php.ini file:
extension=php_curl.dll

it turns out that curl was not installed correct, hence not capable for composer to fetch the necessary files for guzzle

has someone fixed this on mac?

I am still having the same problem with raspberry pi.

has someone fixed this on mac?

Try composer install --ignore-platform-reqs

sudo apt-get install php7.3-curl for php 7.3
One thing, I want to mention here for this particular extension you have to specify your php version that you can find out by php -v and replace with above 7.3 with your current configure/installed version.

sudo apt-get install php7.3.*-curl for php 7.3

This worked for me

for php 7.4
sudo apt-get install php7.4-curl

Was this page helpful?
0 / 5 - 0 ratings

Related issues

warroyo picture warroyo  路  4Comments

dapphp picture dapphp  路  3Comments

nimaamiri92 picture nimaamiri92  路  4Comments

tbergeron picture tbergeron  路  4Comments

tzookb picture tzookb  路  5Comments