0

During installing Magento using Composer i get:

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

Problem 1 - Root composer.json requires magento/product-community-edition 2.4.5 -> satisfiable by magento/product-community-edition[2.4.5]. - magento/product-community-edition 2.4.5 requires ext-intl * -> it is missing from your system. Install or enable PHP's intl extension. Problem 2 - magento/magento2-functional-testing-framework[3.7.0, ..., 3.11.1] require ext-intl * -> it is missing from your system. Install or enable PHP's intl extension. - Root composer.json requires magento/magento2-functional-testing-framework ^3.7 -> satisfiable by magento/magento2-functional-testing-framework[3.7.0, ..., 3.11.1].

To enable extensions, verify that they are enabled in your .ini files: - /etc/php/8.1/cli/php.ini - /etc/php/8.1/cli/conf.d/10-mysqlnd.ini - /etc/php/8.1/cli/conf.d/10-opcache.ini - /etc/php/8.1/cli/conf.d/10-pdo.ini - /etc/php/8.1/cli/conf.d/15-xml.ini - /etc/php/8.1/cli/conf.d/20-bz2.ini - /etc/php/8.1/cli/conf.d/20-calendar.ini - /etc/php/8.1/cli/conf.d/20-ctype.ini - /etc/php/8.1/cli/conf.d/20-curl.ini - /etc/php/8.1/cli/conf.d/20-dom.ini - /etc/php/8.1/cli/conf.d/20-exif.ini - /etc/php/8.1/cli/conf.d/20-ffi.ini - /etc/php/8.1/cli/conf.d/20-fileinfo.ini - /etc/php/8.1/cli/conf.d/20-ftp.ini - /etc/php/8.1/cli/conf.d/20-gd.ini - /etc/php/8.1/cli/conf.d/20-gettext.ini - /etc/php/8.1/cli/conf.d/20-iconv.ini - /etc/php/8.1/cli/conf.d/20-mbstring.ini - /etc/php/8.1/cli/conf.d/20-mysqli.ini - /etc/php/8.1/cli/conf.d/20-pdo_mysql.ini - /etc/php/8.1/cli/conf.d/20-phar.ini - /etc/php/8.1/cli/conf.d/20-posix.ini - /etc/php/8.1/cli/conf.d/20-readline.ini - /etc/php/8.1/cli/conf.d/20-shmop.ini - /etc/php/8.1/cli/conf.d/20-simplexml.ini - /etc/php/8.1/cli/conf.d/20-sockets.ini - /etc/php/8.1/cli/conf.d/20-sysvmsg.ini - /etc/php/8.1/cli/conf.d/20-sysvsem.ini - /etc/php/8.1/cli/conf.d/20-sysvshm.ini - /etc/php/8.1/cli/conf.d/20-tokenizer.ini - /etc/php/8.1/cli/conf.d/20-xmlreader.ini - /etc/php/8.1/cli/conf.d/20-xmlwriter.ini - /etc/php/8.1/cli/conf.d/20-xsl.ini - /etc/php/8.1/cli/conf.d/20-zip.ini You can also run php --ini in a terminal to see which files are used by PHP in CLI mode. Alternatively, you can run Composer with --ignore-platform-req=ext-intl --ignore-platform-req=ext-intl to temporarily ignore these required extensions.

Below I'm sending how my php --ini looks like:

Configuration File (php.ini) Path: /etc/php/8.1/cli Loaded Configuration File: /etc/php/8.1/cli/php.ini Scan for additional .ini files in: /etc/php/8.1/cli/conf.d Additional .ini files parsed: /etc/php/8.1/cli/conf.d/10-mysqlnd.ini, /etc/php/8.1/cli/conf.d/10-opcache.ini, /etc/php/8.1/cli/conf.d/10-pdo.ini, /etc/php/8.1/cli/conf.d/15-xml.ini, /etc/php/8.1/cli/conf.d/20-bz2.ini, /etc/php/8.1/cli/conf.d/20-calendar.ini, /etc/php/8.1/cli/conf.d/20-ctype.ini, /etc/php/8.1/cli/conf.d/20-curl.ini, /etc/php/8.1/cli/conf.d/20-dom.ini, /etc/php/8.1/cli/conf.d/20-exif.ini, /etc/php/8.1/cli/conf.d/20-ffi.ini, /etc/php/8.1/cli/conf.d/20-fileinfo.ini, /etc/php/8.1/cli/conf.d/20-ftp.ini, /etc/php/8.1/cli/conf.d/20-gd.ini, /etc/php/8.1/cli/conf.d/20-gettext.ini, /etc/php/8.1/cli/conf.d/20-iconv.ini, /etc/php/8.1/cli/conf.d/20-mbstring.ini, /etc/php/8.1/cli/conf.d/20-mysqli.ini, /etc/php/8.1/cli/conf.d/20-pdo_mysql.ini, /etc/php/8.1/cli/conf.d/20-phar.ini, /etc/php/8.1/cli/conf.d/20-posix.ini, /etc/php/8.1/cli/conf.d/20-readline.ini, /etc/php/8.1/cli/conf.d/20-shmop.ini, /etc/php/8.1/cli/conf.d/20-simplexml.ini, /etc/php/8.1/cli/conf.d/20-sockets.ini, /etc/php/8.1/cli/conf.d/20-sysvmsg.ini, /etc/php/8.1/cli/conf.d/20-sysvsem.ini, /etc/php/8.1/cli/conf.d/20-sysvshm.ini, /etc/php/8.1/cli/conf.d/20-tokenizer.ini, /etc/php/8.1/cli/conf.d/20-xmlreader.ini, /etc/php/8.1/cli/conf.d/20-xmlwriter.ini, /etc/php/8.1/cli/conf.d/20-xsl.ini, /etc/php/8.1/cli/conf.d/20-zip.ini

Could I ask you for any advice?

enter image description here

enter image description here

1
  • These are my results: /etc/php/8.1/cli/php.ini:;extension=intl /etc/php/8.1/apache2/php.ini:;extension=intl /etc/php/7.4/cli/php.ini:;extension=intl /etc/php/7.4/apache2/php.ini:;extension=intl /etc/php/8.0/mods-available/intl.ini:extension=intl.so /etc/php/8.0/cli/php.ini:;extension=intl /etc/php/8.0/apache2/php.ini:;extension=intl So what exactly should i remove and where? Nov 13, 2022 at 16:59

1 Answer 1

0

Magento requires PHP intl extension, it is missing from your system.

  1. Check if your PHP installed intl extension or not by running the command grep -r extension=intl /etc.
  • If you see any result like /etc/php.d/20-intl.ini:;extension=intl, open /etc/php.d/20-intl.ini file to remove the semicolon before extension=intl.

  • If you see any result like /etc/php-zts.d/20-intl.ini:;extension=intl, open /etc/php-zts.d/20-intl.ini file to remove the semicolon before extension=intl.

Then restart your Web server. open /etc/php/8.1/cli/php.ini

  1. If you don't see results like above, that indicates you didn't install intl extensions yet, you can install it by running the below command:
sudo apt-get install php8.1-intl
36
  • If this answer works as your expected, please mark it as accepted. That indicates your issue is solved and makes it easier for others with the same issue to find a verified answer.
    – Tu Van
    Nov 12, 2022 at 4:36
  • These are my results: /etc/php/8.1/cli/php.ini:;extension=intl /etc/php/8.1/apache2/php.ini:;extension=intl /etc/php/7.4/cli/php.ini:;extension=intl /etc/php/7.4/apache2/php.ini:;extension=intl /etc/php/8.0/mods-available/intl.ini:extension=intl.so /etc/php/8.0/cli/php.ini:;extension=intl /etc/php/8.0/apache2/php.ini:;extension=intl So what exactly should i remove and where? Nov 13, 2022 at 16:58
  • Open /etc/php/8.1/cli/php.ini file, remove the semicolon from ;extension=intl, then restart apache.
    – Tu Van
    Nov 13, 2022 at 17:01
  • After removing semicolon from ;extension=intl in /etc/php/8.1/cli/php.ini, when I typed grep -r extension=intl /et I only gained another result: /etc/php/8.1/cli/php.ini.save:;extension=intl Maybe that's because I didn't restart appache, but for /etc/init.d/apache2 restart I get: Restarting apache2 (via systemctl): apache2.serviceJob for apache2.service failed because the control process exited with error code. See "systemctl status apache2.service" and "journalctl -xe" for details. failed! Nov 13, 2022 at 17:35
  • You getting that error because you have some syntax error in /etc/php/8.1/cli/php.ini when you edit that file. Check that file again to make sure everything has the correct syntax. Did you edit other files beside /etc/php/8.1/cli/php.ini? If so, you should check these files to make sure everything has the correct syntax.
    – Tu Van
    Nov 13, 2022 at 17:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.