I was trying to install composer from the official docs when this popped up:
Some settings on your machine make Composer unable to work properly.
Make sure that you fix the issues listed below and run this script again:
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
I tried installing php-phar and php8.1-phar using apt-get
but it seems to have been replaced by php8.1-common.
lvjhn@peridot:~/Temp$ sudo apt install php8.1-phar
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Note, selecting 'php8.1-common' instead of 'php8.1-phar'
php8.1-common is already the newest version (8.1.11-1+ubuntu22.04.1+deb.sury.org+2).
Edit: I used the wrong word search instead of install.
I'm using the one from ondrej
repository.
How to solve? Thank you.