Reputation: 141
When I try intall composer, this error shows:
To enable extensions, verify that they are enabled in your .ini files
I'm using CyberPanel
so I run this command, but got error.
sudo apt-get install php7.4 libapache2-mod-php7.4 php7.4-common php7.4-gd php7.4-mysql php7.4-curl php7.4-intl php7.4-xsl php7.4-mbstring php7.4-zip php7.4-bcmath php7.4-soap php-xdebug php-imagick
Upvotes: 1
Views: 350
Reputation: 35
Try adding
sudo add-apt-repository ppa:ondrej/php
since when required PHP version or its extensions (like Ondřej's PPA) is not added, the package won't be found. Then try running the installation command again. for this case
sudo apt-get install php7.4 libapache2-mod-php7.4 php7.4-common php7.4-gd php7.4-mysql php7.4-curl php7.4-intl php7.4-xsl php7.4-mbstring php7.4-zip php7.4-bcmath php7.4-soap php-xdebug php-imagick
Also when the user running the command composer install
has permission to create directories or you can add using
sudo chown -R $USER:$USER PROJECT_PATH
sudo chmod -R 775 PROJECT_PATH
do not forget to replace PROJECT_PATH
with actual path like /var/www/myapp
then try again running composer install
Upvotes: -2