Library GD issue - php

While installing maatwebsite/excel composer it is throwing an error regarding gd library is missing. But I checked in my system gd is already enabled.
Please see the error message below. I also attached a screenshot for the error and phpinfo screen.
Your requirements could not be resolved to an installable set of packages.
Problem 1
Installation request for phpoffice/phpspreadsheet 1.14.1 -> satisfiable by phpoffice/phpspreadsheet[1.14.1].
phpoffice/phpspreadsheet 1.14.1 requires ext-gd * -> the requested PHP extension gd is missing from your system.
Problem 2
phpoffice/phpspreadsheet 1.14.1 requires ext-gd * -> the requested PHP extension gd is missing from your system.
maatwebsite/excel 3.1.21 requires phpoffice/phpspreadsheet ^1.14 -> satisfiable by phpoffice/phpspreadsheet[1.14.1].
Installation request for maatwebsite/excel 3.1.21 -> satisfiable by maatwebsite/excel[3.1.21].
To enable extensions, verify that they are enabled in your .ini files:
- /usr/local/etc/php/conf.d/docker-php-ext-intl.ini
- /usr/local/etc/php/conf.d/docker-php-ext-sodium.ini
- /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
- /usr/local/etc/php/conf.d/docker-php-ext-zip.ini
You can also run php --ini inside terminal to see which files are used by PHP in CLI mode.

Related

Your requirements could not be resolved to an installable set of packages php ini (windows)

I have installed composer 1.10.5 php 7.4.1 after downloading reposotory from github I tried code 'composer install' I got an error(but works on project which I have created)
error:
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 league/flysystem 1.0.66 -> satisfiable by league/flysystem[1.0.66].
- league/flysystem 1.0.66 requires ext-fileinfo * -> the requested PHP extension fileinfo is missing from your system.
Problem 2
- league/flysystem 1.0.66 requires ext-fileinfo * -> the requested PHP extension fileinfo is missing from your system.
- laravel/framework v7.6.1 requires league/flysystem ^1.0.8 -> satisfiable by league/flysystem[1.0.66].
- Installation request for laravel/framework v7.6.1 -> satisfiable by laravel/framework[v7.6.1].
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.

Sylius instalation

Any ideas? :3 I have got a problem with installing sylius. I installed a lamp and composer. So that should work. Also, I tried to install curl and things like that.
Problem 1
- Installation request for jeremykendall/php-domain-parser 3.0.0 -> satisfiable by jeremykendall/php-domain-parser[3.0.0].
- jeremykendall/php-domain-parser 3.0.0 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
Problem 2
- Installation request for league/uri 4.1.1 -> satisfiable by league/uri[4.1.1].
- league/uri 4.1.1 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
Problem 3
- Installation request for behat/behat v3.1.0 -> satisfiable by behat/behat[v3.1.0].
- behat/behat v3.1.0 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
Problem 4
- league/uri 4.1.1 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
- payum/payum 1.3.2 requires league/uri ~4.0 -> satisfiable by league/uri[4.1.1].
- Installation request for payum/payum 1.3.2 -> satisfiable by payum/payum[1.3.2].
To enable extensions, verify that they are enabled in your .ini files:
[long .ini files list]
You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.
1.find your php.ini
2.make sure the directive extension_dir=C:\path\to\server\php\ext is set and adjust the path (set your PHP extension dir)
3.make sure the directive extension=php_mbstring.dll is set (uncommented)
If this doesn't work and the php_mbstring.dll file is missing, then the PHP installation of this stack is simply broken and you can install it with:
sudo apt-get install php-mbstring

Cant install mPDF package using Composer PHP - requires ext-gd

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!

Cannot Update Composer in Command Line

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

Composer can't find mongodb extension

When executing composer require jenssegers/mongodb:
$ composer require jenssegers/mongodb
Using version ^3.0 for jenssegers/mongodb
./composer.json has been updated
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
- jenssegers/mongodb v3.0.0 requires mongodb/mongodb ^1.0.0 -> satisfiable by mongodb/mongodb[1.0.0, 1.0.1].
- jenssegers/mongodb v3.0.1 requires mongodb/mongodb ^1.0.0 -> satisfiable by mongodb/mongodb[1.0.0, 1.0.1].
- jenssegers/mongodb v3.0.2 requires mongodb/mongodb ^1.0.0 -> satisfiable by mongodb/mongodb[1.0.0, 1.0.1].
- mongodb/mongodb 1.0.1 requires ext-mongodb ^1.1.0 -> the requested PHP extension mongodb is missing from your system.
- mongodb/mongodb 1.0.0 requires ext-mongodb ^1.1.0 -> the requested PHP extension mongodb is missing from your system.
- Installation request for jenssegers/mongodb ^3.0 -> satisfiable by
ers/mongodb[v3.0.0, v3.0.1, v3.0.2].
To enable extensions, verify that they are enabled in those .ini files
- C:\wamp\bin\php\php5.5.12\php.ini
You can also run php --ini inside terminal to see which files are us
P in CLI mode.
Installation failed, reverting ./composer.json to its original content.
I am running Windows 7 and PHP 5.5.12 use mongodb 3.2 . I installed the mongodb extension (php_mongodb.dll in PHP ext/ folder), and I've updated php.ini with extension=php_mongodb.dll. Not sure what I've missed
There are two kinds of drivers available at pecl
You need to install the mongoDB database driver. As you explained it looks like you have installed the mongoDB driver for PHP which is not correct
and you have to add php_mongo.dll in your php.ini
extension=php_mongo.dll
as explained here
get the proper DLL from here
You will get something like this in your phpinfo();
I hope this helps. Thanks,

Categories