3

I am trying to set up a local Magento 2.4.2 instance just to experiment and develop some work, but I keep hitting a problem with PHP extensions when I run composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition

Creating a "magento/project-community-edition" project at "./project-community-edition"
Installing magento/project-community-edition (2.4.2)
 - Installing magento/project-community-edition (2.4.2): Extracting archive
Created project in /home/rafael/Desktop/project-community-edition
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
 Problem 1
 - Root composer.json requires magento/product-community-edition 2.4.2 -> satisfiable by magento/product-community-edition[2.4.2].
 - magento/product-community-edition 2.4.2 requires ext-curl * -> it is missing from your system. Install or enable PHP's curl extension.
 Problem 2
 - magento/magento2-functional-testing-framework[3.0.0, ..., 3.3.0] require ext-curl * -> it is missing from your system. Install or enable PHP's curl extension.
 - Root composer.json requires magento/magento2-functional-testing-framework ^3.0 -> satisfiable by magento/magento2-functional-testing-framework[3.0.0, ..., 3.3.0].
To enable extensions, verify that they are enabled in your .ini files:
 - /etc/php/7.4/cli/php.ini
 - /etc/php/7.4/cli/conf.d/10-opcache.ini
 - /etc/php/7.4/cli/conf.d/10-pdo.ini
 - /etc/php/7.4/cli/conf.d/15-xml.ini
 - /etc/php/7.4/cli/conf.d/20-calendar.ini
 - /etc/php/7.4/cli/conf.d/20-ctype.ini
 - /etc/php/7.4/cli/conf.d/20-dom.ini
 - /etc/php/7.4/cli/conf.d/20-exif.ini
 - /etc/php/7.4/cli/conf.d/20-ffi.ini
 - /etc/php/7.4/cli/conf.d/20-fileinfo.ini
 - /etc/php/7.4/cli/conf.d/20-ftp.ini
 - /etc/php/7.4/cli/conf.d/20-gettext.ini
 - /etc/php/7.4/cli/conf.d/20-iconv.ini
 - /etc/php/7.4/cli/conf.d/20-json.ini
 - /etc/php/7.4/cli/conf.d/20-mbstring.ini
 - /etc/php/7.4/cli/conf.d/20-phar.ini
 - /etc/php/7.4/cli/conf.d/20-posix.ini
 - /etc/php/7.4/cli/conf.d/20-readline.ini
 - /etc/php/7.4/cli/conf.d/20-shmop.ini
 - /etc/php/7.4/cli/conf.d/20-simplexml.ini
 - /etc/php/7.4/cli/conf.d/20-sockets.ini
 - /etc/php/7.4/cli/conf.d/20-sysvmsg.ini
 - /etc/php/7.4/cli/conf.d/20-sysvsem.ini
 - /etc/php/7.4/cli/conf.d/20-sysvshm.ini
 - /etc/php/7.4/cli/conf.d/20-tokenizer.ini
 - /etc/php/7.4/cli/conf.d/20-xmlreader.ini
 - /etc/php/7.4/cli/conf.d/20-xmlwriter.ini
 - /etc/php/7.4/cli/conf.d/20-xsl.ini
You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.

I already tried to install the extensions with the following command:

sudo apt-get install php7.4-opcache php7.4-pdo php7.4-calendar php7.4-ctype php7.4-dom php7.4-exif php7.4-ffi php7.4-fileinfo php7.4-ftp php7.4-gettext php7.4-iconv php7.4-json php7.4-mbstring php7.4-phar php7.4-posix php7.4-readline php7.4-shmop php7.4-simplexml php7.4-sockets php7.4-sysvmsg php7.4-sysvsem php7.4-sysvshm php7.4-tokenizer php7.4-xmlreader php7.4-xmlwriter php7.4-xsl

PHP version:

PHP 7.4.3 (cli) (built: Oct 6 2020 15:47:56) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
 with Zend OPcache v7.4.3, Copyright (c), by Zend Technologies

Mysql version:

mysql Ver 8.0.23-0ubuntu0.20.04.1 for Linux on x86_64 ((Ubuntu))

Elasticsearch version:

{
 "name" : "magecomp4",
 "cluster_name" : "magento-local-app-dummy",
 "cluster_uuid" : "keE77f1bQyudHuyvNVFWYQ",
 "version" : {
 "number" : "7.11.1",
 "build_flavor" : "default",
 "build_type" : "deb",
 "build_hash" : "ff17057114c2199c9c1bbecc727003a907c0db7a",
 "build_date" : "2021年02月15日T13:44:09.394032Z",
 "build_snapshot" : false,
 "lucene_version" : "8.7.0",
 "minimum_wire_compatibility_version" : "6.8.0",
 "minimum_index_compatibility_version" : "6.0.0-beta1"
 },
 "tagline" : "You Know, for Search"
}

Can anyone please help me?

asked Mar 3, 2021 at 14:50

2 Answers 2

4

The error refers to PHP's curl extension missing and don't see it in your php modules install command. You can run php -m to double-check and confirm it's really missing.

If it's missing, you should install it:

sudo apt-get install php7.4-curl

However, I would suggest you read the documentation about required PHP settings and make sure that you have everything in there.


Sidenote: It just occurred to me (maybe I am wrong) that when you ran the command

sudo apt-get install php7.4-opcache php7.4-pdo php7.4-calendar php7.4-ctype php7.4-dom php7.4-exif php7.4-ffi php7.4-fileinfo php7.4-ftp php7.4-gettext php7.4-iconv php7.4-json php7.4-mbstring php7.4-phar php7.4-posix php7.4-readline php7.4-shmop php7.4-simplexml php7.4-sockets php7.4-sysvmsg php7.4-sysvsem php7.4-sysvshm php7.4-tokenizer php7.4-xmlreader php7.4-xmlwriter php7.4-xsl

it is possible that you thought that those extensions are missing since they were referred in the error message by the text To enable extensions, verify that they are enabled in your .ini files:'. That message only tells you which additional .ini files were parsed as a hint where to look and not which extensions were missing.

answered Mar 3, 2021 at 15:02
2
  • 1
    Thank you a lot, I understood my mistake by looking at the message with more attention, thanks! Commented Mar 3, 2021 at 15:57
  • 1
    You are most welcome! :) Commented Mar 3, 2021 at 15:58
2

In case anyone searching for php8.1 ヅ

sudo apt-get install php8.1-opcache php8.1-pdo php8.1-calendar php8.1-ctype php8.1-dom php8.1-exif php8.1-ffi php8.1-fileinfo php8.1-ftp php8.1-gettext php8.1-iconv php8.1-mbstring php8.1-phar php8.1-posix php8.1-readline php8.1-shmop php8.1-simplexml php8.1-sockets php8.1-sysvmsg php8.1-sysvsem php8.1-sysvshm php8.1-tokenizer php8.1-xmlreader php8.1-xmlwriter php8.1-xsl php8.1-soap php8.1-bcmath php8.1-intl php8.1-gd php8.1-mysql php8.1-zip
answered May 20, 2022 at 9:52

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.