0

I tried executing this line

php artisan jetstream:install livewire

but returned this.

PHP's phar extension is missing. Composer requires it to run. Enable the extension or recompile php without --disable-phar then try again.

I has phar enabled

~/web/example-app$ php -i | grep -i phar
/etc/php/8.2/cli/conf.d/20-phar.ini,
Registered PHP Streams => https, ftps, compress.zlib, php, file, glob, data, http, ftp, phar
Phar
Phar: PHP Archive support => enabled
Phar API version => 1.1.1
Phar-based phar archives => enabled
Tar-based phar archives => enabled
ZIP-based phar archives => enabled
Phar based on pear/PHP_Archive, original concept by Davey Shafik.
Phar fully realized by Gregory Beaver and Marcus Boerger.
phar.cache_list => no value => no value
phar.readonly => On => On
phar.require_hash => On => On

but this error always happens

Composer version 2.5.5 2023-03-21 11:50:05

Please, someone could help me ?

Someone could help me ?

Arpit Jain
  • 1,599
  • 9
  • 23
  • You can try a little hack to see if it helps: do `which php` to get the path of your current php binary and then do `PHP_BINARY=/path/to/php php artisan jetstream:install livewire`. – apokryfos May 11 '23 at 14:41
  • Does this answer your question? [How do I install / enable the PHP phar extension?](https://stackoverflow.com/questions/22047487/how-do-i-install-enable-the-php-phar-extension) – Nico Haase May 11 '23 at 14:59
  • Did you check which PHP version Composer uses? Maybe it's not the same that you're using through `php -i` – Nico Haase May 11 '23 at 15:01
  • 1
    If you printout your `phpinfo();` do you see your Phar extention installed properly? You should see it in the `Registered PHP Streams` column in your general PHP Version info and also there should be a completely isolated Phar section. Is it possible that you have multiple PHP installations on your system? Are they correctly installed? You might solve your issues by reinstalling your PHP. – furyozo May 11 '23 at 15:04

0 Answers0