Your requirements could not be resolved to an installable set of packages. Composer Yii2 PHP extension – FIXED

codeception/codeception 4.1.5 requires ext-curl * -> the requested PHP extension curl is missing from your system.

This is the output of error on the terminal when we are installing Yii2 on Ubuntu 20.04 LTS.


vetechno@ubuntu:~$ composer create-project --prefer-dist yiisoft/yii2-app-basic test_demo1

Creating a "yiisoft/yii2-app-basic" project at "./test_demo1"

Installing yiisoft/yii2-app-basic (2.0.35)

- Installing yiisoft/yii2-app-basic (2.0.35): Loading from cache

Created project in /home/vetechno/test_demo1

Loading composer repositories with package information

Updating dependencies (including require-dev)

Your requirements could not be resolved to an installable set of packages.

Problem 1

- codeception/codeception 4.1.5 requires ext-curl * -> the requested PHP extension curl is missing from your system.

- codeception/codeception 4.1.4 requires ext-curl * -> the requested PHP extension curl is missing from your system.

- codeception/codeception 4.1.3 requires ext-curl * -> the requested PHP extension curl is missing from your system.

- codeception/codeception 4.1.1 requires ext-curl * -> the requested PHP extension curl is missing from your system.

- codeception/codeception 4.0.3 requires ext-curl * -> the requested PHP extension curl is missing from your system.

- codeception/codeception 4.0.2 requires ext-curl * -> the requested PHP extension curl is missing from your system.

- Installation request for codeception/codeception ^4.0 -> satisfiable by codeception/codeception[4.0.0, 4.0.1, 4.0.2, 4.0.3, 4.1.0, 4.1.1, 4.1.2, 4.1.3, 4.1.4, 4.1.5].



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

- /etc/php/7.2/cli/php.ini

- /etc/php/7.2/cli/conf.d/10-mysqlnd.ini

- /etc/php/7.2/cli/conf.d/10-opcache.ini

- /etc/php/7.2/cli/conf.d/10-pdo.ini

- /etc/php/7.2/cli/conf.d/20-calendar.ini

- /etc/php/7.2/cli/conf.d/20-ctype.ini

- /etc/php/7.2/cli/conf.d/20-exif.ini

- /etc/php/7.2/cli/conf.d/20-fileinfo.ini

- /etc/php/7.2/cli/conf.d/20-ftp.ini

- /etc/php/7.2/cli/conf.d/20-gettext.ini

- /etc/php/7.2/cli/conf.d/20-iconv.ini

- /etc/php/7.2/cli/conf.d/20-json.ini

- /etc/php/7.2/cli/conf.d/20-mbstring.ini

- /etc/php/7.2/cli/conf.d/20-mysqli.ini

- /etc/php/7.2/cli/conf.d/20-pdo_mysql.ini

- /etc/php/7.2/cli/conf.d/20-phar.ini
You can also run `php –ini` inside terminal to see which files are used by PHP in CLI mode.

Solutions:-

This error generally comes when you are installing Yii2 in Ubuntu LTS. It may be missing some php extensions in Ubuntu LTS. If you are using php7.2 then install php7.2 extensions :-


sudo apt-get install php7.2 libapache2-mod-php7.2 php7.2-common php7.2-gd php7.2-mysql php7.2-curl php7.2-intl php7.2-xsl php7.2-mbstring php7.2-zip php7.2-bcmath php7.2-soap php-xdebug php-imagick


sudo apt update

For php7.3 :-


sudo apt-get install php7.3-cli php7.3-common php7.3-json php7.3-opcache php7.3-mysql php7.3-mbstring  php7.3-zip php7.3-fpm php7.3-intl php7.3-simplexml


Update the repository


sudo apt update

Conclusion

Hey, congratulation you have successfully fixed the error message when you are installing yii2 on Ubuntu Debian operating system. Please let me know in the comment box if you are facing any issue.

Leave a Reply

Your email address will not be published.