I am getting this error every time I run composer update in my Yii2 framework project:
Problem 1
- phpunit/phpunit[9.5.0, ..., 9.5.28] require ext-dom * ->
it is missing from your system. Install or enable PHP's dom extension.
- Root composer.json requires phpunit/phpunit ~9.5.0 ->
satisfiable by phpunit/phpunit[9.5.0, ..., 9.5.28].
I have tried running run Composer with --ignore-platform-req=ext-dom but returns the same error.
This error message is indicating that the phpunit/phpunit package requires the ext-dom extension, but it is not installed or enabled on your system.
To resolve this issue, you need to install the ext-dom extension on your system. You can do this by running the following command in your terminal:
sudo apt-get install php-xml
After installing the ext-dom extension, try running composer update again to see if the issue has been resolved. If you continue to experience the same error, you may need to restart your web server or check your PHP configuration to ensure that the ext-dom extension is properly loaded.
Related
I am trying to install mPDF package and when I run the command composer require mpdf/mpdf it displays these errors:
Your requirements could not be resolved to an installable set of packages.
Problem 1
- The requested PHP extension ext-gd * is missing from your system. Install or enable PHP's gd extension.
Problem 2
- mpdf/mpdf v8.0.2 requires ext-gd * -> the requested PHP extension gd is missing from your system.
- mpdf/mpdf v8.0.1 requires ext-gd * -> the requested PHP extension gd is missing from your system.
- mpdf/mpdf v8.0.0 requires ext-gd * -> the requested PHP extension gd is missing from your system.
- Installation request for mpdf/mpdf ^8.0 -> satisfiable by mpdf/mpdf[v8.0.0, v8.0.1, v8.0.2].
To enable extensions, verify that they are enabled in your .ini files:
- C:\php\php.ini
You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.
Installation failed, reverting ./composer.json to its original content.
Can I just download mPDF and place it in my working repo? Or do I have to use Composer to install it?
I tried to search for this errors and I think the only solution would be to install chocolatey and then use it to install php7.3.2-gd , but if there is a better solution please let me know!
I am updating the composer and it shows up some error like below.
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
- pusher/pusher-php-server v3.4.1 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- pusher/pusher-php-server v3.4.0 requires php >=5.4 <7.3 -> your PHP version (7.3.6) does not satisfy that requirement.
- pusher/pusher-php-server v3.3.1 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- pusher/pusher-php-server v3.3.0 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- pusher/pusher-php-server 3.4.x-dev requires ext-curl * -> the requested PHP extension curl is missing from your system.
- Installation request for pusher/pusher-php-server ^3.3 -> satisfiable by pusher/pusher-php-server[3.4.x-dev, v3.3.0, v3.3.1, v3.4.0, v3.4.1].
To enable extensions, verify that they are enabled in your .ini files:
- C:\PHP7\php.ini
You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.
the pusher v3 doesn't support php version that higher than 7.3
there are some options :
first is downgrade the php to the requirement (not recomended), the second one is use this command to upgrade the pusher to version 4
composer require pusher/pusher-php-server
could please check curl enabled in your php use ;extension=php_curl.dll remove semi colon in php.ini file and try
try following command
install first curl using following command.
sudo apt-get install curl
then use
sudo apt-get install composer
I am trying to install composer to the laravel project.
When im doing sudo composer install in projects directory it shows me two errors:
Problem 1
- Installation request for simplesoftwareio/simple-qrcode dev-master -> satisfiable by simplesoftwareio/simple-qrcode[dev-master].
- simplesoftwareio/simple-qrcode dev-master requires ext-gd * -> the requested PHP extension gd is missing from your system.
Problem 2
- Installation request for esendex/sdk ^1.3 -> satisfiable by esendex/sdk[v1.3.0].
- esendex/sdk v1.3.0 requires ext-curl * -> the requested PHP extension curl is missing from your system.
I was checking how to install it and I found these commands:
composer require simplesoftwareio/simple-qrcode
composer require esendex/sdk
Anyway, they are giving me the same error. Is there anything I can do about it?
Looks like you have some PHP modules missing.
For PHP5
sudo apt-get install php5-curl
sudo apt-get install php5-gd
For PHP7
sudo apt-get install php7-curl
sudo apt-get install php7-gd
Packages may be different depending on your OS
Is there anything I can do about it?
Yes. You can install the two PHP modules that Composer tells you are required:
simplesoftwareio/simple-qrcode dev-master requires ext-gd * -> the requested PHP extension gd is missing from your system.
esendex/sdk v1.3.0 requires ext-curl * -> the requested PHP extension curl is missing from your system.
Exactly how you do that will depend on your operating system.
Ubuntu 16.10, for example, offers php-gd and php-curl system packages.
I am trying to get started with laravel on windows and here is the command I tried:
rahul#rahulserver MINGW64 /d/PhpIdeaProjects/LaravelLearning
$ composer create-project laravel/laravel learning-laravel-5
Here is the output I get:
Installing laravel/laravel (v5.0.22)
- Installing laravel/laravel (v5.0.22)
Loading from cache
Created project in learning-laravel-5
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for danielstjules/stringy 1.9.0 -> satisfiable by danielstjules/stringy[1.9.0].
- danielstjules/stringy 1.9.0 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
Problem 2
- Installation request for laravel/framework v5.0.16 -> satisfiable by laravel/framework[v5.0.16].
- laravel/framework v5.0.16 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
So how shall I move on and have it working?
The requested dependencies require the php extension mbstring as the error explains.
the requested PHP extension mbstring is missing from your system
So install the extension and it should install flawless.
mbstring is built in the libapache2-mod-php5 package. Run
sudo apt-get install libapache2-mod-php5
For windows environments check your php.ini and uncomment the line ;extension=php_mbstring.dll to extension=php_mbstring.dll - then restart your webserver.
I am installing Sylius. In my command prompt I did
composer create-project -s dev sylius/sylius
I get this error message :
C:\wamp\www\Symfony>composer create-project -s dev sylius/sylius
Installing sylius/sylius (dev-master 18d981683430c0afd1a102b6fc67f8ffeaabddc0)
- Installing sylius/sylius (dev-master master)
Cloning master
Created project in C:\wamp\www\Symfony\sylius
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for symfony/icu 1.2.x-dev -> satisfiable by symfony/icu[1.2.x-dev].
- symfony/icu 1.2.x-dev requires lib-icu >=4.4 -> the requested linked library icu has the wrong version installed or is missing from your system, make sure to have the extension providing it.
Problem 2
- Installation request for instaclick/php-webdriver 1.0.x-dev -> satisfiable by instaclick/php-webdriver[1.0.x-dev].
- instaclick/php-webdriver 1.0.x-dev requires ext-curl * -> the requested PHP extension curl is missing from your system.
Problem 3
- Installation request for instaclick/php-webdriver dev-master -> satisfiable by instaclick/php-webdriver[dev-master].
- instaclick/php-webdriver dev-master requires ext-curl * -> the requested PHP extension curl is missing from your system.
Problem 4
- symfony/icu 1.2.x-dev requires lib-icu >=4.4 -> the requested linked library icu has the wrong version installed or is missing from your system, make sure to have the extension providing it.
- symfony/symfony 2.3.x-dev requires symfony/icu ~1.0 -> satisfiable by symfony/icu[1.2.x-dev].
- Installation request for symfony/symfony 2.3.x-dev -> satisfiable by symfony/symfony[2.3.x-dev].
What I tried :
php composer.phar self update
php composer.phar install
Deleting sylius directory
Reinstalling sylius with the create-project command
Fresh installation of Symfony 2.3.4 and reinstallation of sylius
Did what was told in the first answer: enable extension curl and intl
Used the function get_loaded_extension() to confirm that curl and intl are loaded. Well, it is loaded
WAMP has two php.ini files, one for apache and one for CLI. When you click on WAMP tray icon in php modules you can see only modules enabled for apache, and so enabling and disabling modules takes effect only for apache copy of php.ini.
Try enabling curl and intl in X:\path\to\wamp\bin\php\php.ini which is config for CLI (BTW. config for apache is placed in X:\path\to\wamp\bin\apache\bin\php.ini).
It looks like you need to install two PHP extensions to make this work: curl and intl (which provides the lib-icu required by symfony/icu). Since you are using Windows, I recommend the official guide on how to install extensions on Windows systems. You can find the intl extension in the PECL repository here.
curl should be installed on your WAMP already, but disabled by default. See the top answer to this question for instructions on how to enable it.
Sylius has now released the latest version v1.0.0 which I have covered in a blog to install it. Here is the Source: https://www.cloudways.com/blog/install-sylius-ecommerce-framework/
You just need to run the following cammands in SSH or Terminal Sylius will be installed
$ composer create-project -s beta sylius/sylius-standard project
$ cd project
$ npm install
$ npm run gulp
$ bin/console sylius:install