Reputation: 95
my php version is 7.1.1
i'm trying this code to install react/zmq:
$ composer require react/zmq
but i saw this error:
PHP Fatal error: Uncaught Error: Class 'Phar' not found in /cygdrive/c/ProgramData/ComposerSetup/bin/composer.phar:23
Stack trace:
#0 {main}
thrown in /cygdrive/c/ProgramData/ComposerSetup/bin/composer.phar on line 23
what's the problem?
Upvotes: 1
Views: 8735
Reputation: 96
If you're using Ubuntu the Phar class does not seem to be included in the php cli distribution that comes preinstalled.
Locate the php executable file. It's likely to be on /usr/bin/
cd /usr/bin
Try and see if you have php files
ls -l | grep php
You might see php and php7.1 listed. If that's the case
sudo mv php php-old
sudo mv php7.1 php
Upvotes: 0
Reputation: 5332
Phar
extension is installed/enabled.php -d extension=phar.so {path_to_composer_bin} require react/zmq
Upvotes: 2