I installed Xampp on ubuntu 20.04 and then tried to install composer globally with the follwing commands :
sudo apt update
sudo apt install php-cli unzip
cd ~
curl -sS https://getcomposer.org/installer -o composer-setup.php
sudo php composer-setup.php --install-dir=/usr/local/bin --filename=composer
I get this error returned :
The phar extension is missing.
Install it or recompile php without --disable-phar
The iconv OR mbstring extension is required and both are missing.
Install either of them or recompile php without --disable-iconv
So I tried to see if the phar
extension is activated, and it seems to be :
The only odd thing I found is the location of the php.ini, in phpinfo()
it tells me the path is :
But I get this result with php --ini :
php --ini
Configuration File (php.ini) Path: /etc/php/8.0/cli
Loaded Configuration File: (none)
Scan for additional .ini files in: /etc/php/8.0/cli/conf.d
Additional .ini files parsed: (none)
Edit: I also tried to uncomment extension=php_phar.dll and I added myself extension=phar.so