Nicolas Chao
Nicolas Chao

Reputation: 11

Can't update composer.phar - Symfony

When I try to update packages with the terminal command : php composer.phar update I have this error message

Your requirements could not be resolved to an installable set of packages.

Problem 1

- sensio/distribution-bundle v4.0.0 requires sensiolabs/security-checker ~2.0 -> satisfiable by sensiolabs/security-checker[v2.0.5, v2.0.0, v2.0.1, v2.0.2, v2.0.3, v2.0.4].
- sensio/distribution-bundle v4.0.0 requires sensiolabs/security-checker ~2.0 -> satisfiable by sensiolabs/security-checker[v2.0.5, v2.0.0, v2.0.1, v2.0.2, v2.0.3, v2.0.4].
- sensiolabs/security-checker v2.0.5 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- sensiolabs/security-checker v2.0.4 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- sensiolabs/security-checker v2.0.3 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- sensiolabs/security-checker v2.0.2 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- sensiolabs/security-checker v2.0.1 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- sensiolabs/security-checker v2.0.0 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- sensiolabs/security-checker v2.0.5 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- Installation request for sensio/distribution-bundle ~4.0 -> satisfiable by sensio/distribution-bundle[v4.0.0]."

Upvotes: 1

Views: 615

Answers (2)

frumious
frumious

Reputation: 1575

The error message is telling you that sensio/distribution-bundle v4 requires sensiolabs/security-checker v2.0.x, which in turn requires the PHP curl extension, which is not installed. So composer cannot (currently) fulfil the requirements specified in your composer.json. At a basic level, you need to install the curl extension.

Why this happened in your case is difficult to determine without more detail:

  • Have you recently upgraded from distribution bundle v3 to v4? Looks like the dependency on security-checker was introduced between those. You could possibly revert to v3 to avoid this issue.
  • Has the PHP environment changed, to remove the curl extension?

Upvotes: 1

Michael Sivolobov
Michael Sivolobov

Reputation: 13240

As you can see from message: you need to install ext-curl extension for PHP.

To install it in Ubuntu you need to run next command:

sudo apt-get install php5-curl

Don't forget to restart apache (or fpm) after it:

sudo service apache2 restart

or fpm:

sudo service php5-fpm restart

Upvotes: 2

Related Questions