-2

I am updating the composer and it shows up some error like below.

Loading composer repositories with package information Updating dependencies (including require-dev) Your requirements could not be resolved to an installable set of packages.

Problem 1
    - pusher/pusher-php-server v3.4.1 requires ext-curl * -> the requested PHP extension curl is missing from your system.
    - pusher/pusher-php-server v3.4.0 requires php >=5.4 <7.3 -> your PHP version (7.3.6) does not satisfy that requirement.
    - pusher/pusher-php-server v3.3.1 requires ext-curl * -> the requested PHP extension curl is missing from your system.
    - pusher/pusher-php-server v3.3.0 requires ext-curl * -> the requested PHP extension curl is missing from your system.
    - pusher/pusher-php-server 3.4.x-dev requires ext-curl * -> the requested PHP extension curl is missing from your system.
    - Installation request for pusher/pusher-php-server ^3.3 -> satisfiable by pusher/pusher-php-server[3.4.x-dev, v3.3.0, v3.3.1, v3.4.0, v3.4.1].

  To enable extensions, verify that they are enabled in your .ini files:
    - C:\PHP7\php.ini
  You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.
matiit
  • 7,969
  • 5
  • 41
  • 65
Longha Seng
  • 1
  • 1
  • 5
  • Which php version is installed in your system ? and which OS ? – Vipertecpro Jun 21 '19 at 08:37
  • Did you check this post ? https://stackoverflow.com/a/22618953/5928015 – Vipertecpro Jun 21 '19 at 08:38
  • and did you write this in your composer `php >=5.4 <7.3` ?? if you did please remove it put something like this `"php": "^7.1.3",` – Vipertecpro Jun 21 '19 at 08:39
  • My php ver: 7.3.6 and i'm using window... and i didn't make any change in composer file. – Longha Seng Jun 21 '19 at 08:54
  • Well, have you even read that error message? If you added the constraint for `php < 7.3` in that file, and run composer using PHP 7.3.6, the problem is pretty obvious – Nico Haase Jun 21 '19 at 09:23
  • 1
    Possible duplicate of [Composer install missing curl-ext](https://stackoverflow.com/questions/38024937/composer-install-missing-curl-ext) – rob006 Jun 21 '19 at 09:25

3 Answers3

3

the pusher v3 doesn't support php version that higher than 7.3

there are some options :

first is downgrade the php to the requirement (not recomended), the second one is use this command to upgrade the pusher to version 4

composer require pusher/pusher-php-server
ramnit
  • 31
  • 2
-2

could please check curl enabled in your php use ;extension=php_curl.dll remove semi colon in php.ini file and try if curl enabled

  • Please explain why one should check that and how checking that would resolve the given problems – Nico Haase Jun 21 '19 at 09:24
  • may be your composer.json contains some package which use curl you can check whether the curl is enabled or not using simple create a php file and test if its in local machine and if need more assistance in enabling the curl use the following link http://www.tomjepson.co.uk/enabling-curl-in-php-php-ini-wamp-xamp-ubuntu/ – Sruthikeralan Jun 21 '19 at 10:06
  • Please add all relevant information to the answer, not to the comment section. Additionally, you have not explained why checking for that cURL extension helps to resolve all of the error messages. – Nico Haase Jun 21 '19 at 10:20
-3

try following command

install first curl using following command.

sudo apt-get install curl

then use

sudo apt-get install composer
Vipul Prajapati
  • 203
  • 2
  • 4
  • Please explain **why** one should try that. Using the given message, I see no need to install `composer` once more – Nico Haase Jun 22 '19 at 19:48