Bohdan V.
Bohdan V.

Reputation: 141

To enable extensions, verify that they are enabled in your .ini files: - CyberPanel

When I try intall composer, this error shows:

To enable extensions, verify that they are enabled in your .ini files

I'm using CyberPanel

enter image description here

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

enter image description here

Upvotes: 1

Views: 350

Answers (1)

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

Related Questions