This question already has answers here:
How do I install GD on my windows server version of PHP
(8 answers)
Extension gd is missing from your system - laravel composer Update
(23 answers)
Closed 2 years ago.
Good afternoon
Sorry I don't speak english, but I will try to communicate using google translator
To start, it should be important to inform that I use windowns 10, and php 7.2
I'm trying to put some form of payment on my system!
However when typing the command
php composer.phar require "mercadopago/dx-php"
or
composer require "mercadopago/dx-php"
give the following error
You are running Composer with SSL/TLS protection disabled.
Using version ^2.2 for mercadopago/dx-php
./composer.json has been updated
Running composer update mercadopago/dx-php
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 PHP extension ext-gd * but it is missing from your system. Install or enable PHP's gd extension.
Problem 2
- mpdf/mpdf is locked to version v7.1.9 and an update of this package was not requested.
- mpdf/mpdf v7.1.9 requires ext-gd * -> it is missing from your system. Install or enable PHP's gd extension.
Problem 3
- spatie/array-to-xml is locked to version 2.16.0 and an update of this package was not requested.
- spatie/array-to-xml 2.16.0 requires php ^7.4|^8.0 -> your php version (7.2.23) does not satisfy that requirement.
Problem 4
- league/flysystem 1.1.3 requires ext-fileinfo * -> it is missing from your system. Install or enable PHP's fileinfo extension.
- laravel/framework v5.6.40 requires league/flysystem ^1.0.8 -> satisfiable by league/flysystem[1.1.3].
- laravel/framework is locked to version v5.6.40 and an update of this package was not requested.
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 and ./composer.lock to their original content.
I gave the following command composer require "ext-gd:" --ignore-platform-reqs* and it happens
You are running Composer with SSL/TLS protection disabled.
./composer.json has been updated
Running composer update ext-gd
Loading composer repositories with package information
Updating dependencies
Nothing to modify in lock file
Installing dependencies from lock file (including require-dev)
Nothing to install, update or remove
Package jakub-onderka/php-console-color is abandoned, you should avoid using it. Use php-parallel-lint/php-console-color instead.
Package jakub-onderka/php-console-highlighter is abandoned, you should avoid using it. Use php-parallel-lint/php-console-highlighter instead.
Package jpgraph/jpgraph is abandoned, you should avoid using it. No replacement was suggested.
Package fzaninotto/faker is abandoned, you should avoid using it. No replacement was suggested.
Package phpunit/php-token-stream is abandoned, you should avoid using it. No replacement was suggested.
Generating optimized autoload files
Class App\agentes located in C:/xampp/htdocs/analiselol - Copia/app\Agentes.php does not comply with psr-4 autoloading standard. Skipping.
Class App\Aportes located in C:/xampp/htdocs/analiselol - Copia/app\aportes.php does not comply with psr-4 autoloading standard. Skipping.
Carbon 1 is deprecated, see how to migrate to Carbon 2.
https://carbon.nesbot.com/docs/#api-carbon-2
You can run ".\vendor\bin\upgrade-carbon" to get help in updating carbon and other frameworks and libraries that depend on it.
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> #php artisan package:discover
Warning: PHP Startup: Unable to load dynamic library 'php_curl.dll[PHP]' (tried: C:\php\ext\php_curl.dll[PHP] (No foi possvel encontrar o mdulo especificado.), C:\php\ext\php_php_curl.dll[PHP].dll (No foi possvel encontrar o mdulo especificado.)) in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library 'php_curl.dll[PHP]' (tried: C:\php\ext\php_curl.dll[PHP] (No foi possvel encontrar o mdulo especificado.), C:\php\ext\php_php_curl.dll[PHP].dll (No foi possvel encontrar o mdulo especificado.)) in Unknown on line 0
Package manifest generated successfully.
56 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
In php.ini i took it out; of the following line
extension = php_gd2.dll
and as I didn't have the line extension=php_gd2.dll I added it there in an attempt to resolve
I'm new to this part of the programming, if you missed something important, I'm sorry, I really need to make it work!
a and follow my composer.json, if it matters
Related
When running my PHP project which is now using version 8.1. I get the error:
PHP Deprecated: Return type of Symfony\Component\Console\Helper\HelperSet::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /Applications/XAMPP/xamppfiles/htdocs/project-core/vendor/symfony/console/Helper/HelperSet.php on line 111
Tried:
php composer.phar update vendor/symfony/console
and got the same error.
Also tried:
composer update symfony/console
and I got conflicts like:
Problem 1
- facebook/webdriver is locked to version 1.2.0 and an update of this package was not requested.
- facebook/webdriver 1.2.0 requires php ^5.5 || ~7.0 -> your php version (8.1.4) does not satisfy that requirement.
Problem 2
- cakephp/collection 3.10.1 requires php >=5.6.0,<8.0.0 -> your php version (8.1.4) does not satisfy that requirement.
- robmorgan/phinx 0.10.8 requires cakephp/collection ^3.6 -> satisfiable by cakephp/collection[3.10.1].
- robmorgan/phinx is locked to version 0.10.8 and an update of this package was not requested.
I also checked THIS LINK. Can someone help me figure out this problem?
I have also seen THIS but I do not think it solves the issue as I can not edit vendor files..
It could be that composer itself needs to be updated, rather than the dependencies you are trying to install.
Upgrading composer v2.0.9 to v2.5.0 was the fix I needed to silence deprecation notices mentioning symfony.
Depending on how you installed composer, and whether you've renamed the phar to just composer and put it in your path, that is done with:
php composer.phar self-update
or
composer self-update
Add sudo if permissions require.
Setup: Windows 10, PHP 8.0.2, composer 2.1.6
I cloned a project from bitbucket and ran composer install.
After Running the command I got the error bellow.
Installing dependencies from lock file (including require-dev)
Verifying lock file contents can be installed on current platform.
Your lock file does not contain a compatible set of packages. Please run composer update.
Problem 1
- ibericode/vat is locked to version 1.2.1 and an update of this package was not requested.
- ibericode/vat 1.2.1 requires ext-soap * -> it is missing from your system. Install or enable PHP's soap extension.
Problem 2
- ibericode/vat 1.2.1 requires ext-soap * -> it is missing from your system. Install or enable PHP's soap extension.
- craftcms/commerce 3.4.2 requires ibericode/vat ^1.1.2 -> satisfiable by ibericode/vat[1.2.1].
- craftcms/commerce is locked to version 3.4.2 and an update of this package was not requested.
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.
I tried running composer update, but I was presented wit h a similar error.
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
- ibericode/vat[1.1.2, ..., 1.2.1] require ext-soap * -> it is missing from your system. Install or enable PHP's soap extension.
- craftcms/commerce 3.4.2 requires ibericode/vat ^1.1.2 -> satisfiable by ibericode/vat[1.1.2, 1.1.3, 1.2.0, 1.2.1].
- Root composer.json requires craftcms/commerce 3.4.2 -> satisfiable by craftcms/commerce[3.4.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.
Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.
Steps that I tried:
enable soap extension in php.ini
confirm that php_soap.dll is in the php extension folder php/ext
restart the machine
But that didn't help.
Then I tried the answer provided in https://craftcms.stackexchange.com/a/30270
That didn't help either.
I'm having difficulty running composer install on Jenkins.
I have a Jenkins job that I need to run composer install for. I have installed php7.2 and composer. When I run the command, I get the following errors:
composer install
Problem 1
- teamtnt/tntsearch v1.3.2 requires ext-pdo_sqlite * -> the requested PHP extension pdo_sqlite is missing from your system.
- teamtnt/tntsearch v1.3.2 requires ext-pdo_sqlite * -> the requested PHP extension pdo_sqlite is missing from your system.
- Installation request for teamtnt/tntsearch v1.3.2 -> satisfiable by teamtnt/tntsearch[v1.3.2].
So I install sqlite using the following command: sudo apt-get install php7.2-sqlite3
After this, I get the additional warning, and the error persists.
PHP Warning: PHP Startup: Unable to load dynamic library 'pdo_sqlite.so'
(tried: /usr/lib/php/20170718/pdo_sqlite.so (/usr/lib/php/20170718/pdo_sqlite.so:
undefined symbol: sqlite3_column_table_name), /usr/lib/php/20170718/pdo_sqlite.so.so
(/usr/lib/php/20170718/pdo_sqlite.so.so: cannot open shared object file:
No such file or directory)) in Unknown on line 0
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
- teamtnt/tntsearch v1.3.2 requires ext-pdo_sqlite * -> the requested PHP extension pdo_sqlite is missing from your system.
- teamtnt/tntsearch v1.3.2 requires ext-pdo_sqlite * -> the requested PHP extension pdo_sqlite is missing from your system.
- Installation request for teamtnt/tntsearch v1.3.2 -> satisfiable by teamtnt/tntsearch[v1.3.2].
When I ssh into the Jenkins box and run composer install from the workspace directory, everything runs as expected and the vendor directory is generated with no errors.
I have spent a lot of time looking at the answers to existing questions on StackOverflow.
I've purged everything that is not php7.2, and removed any previous versions of my machine.
I have also installed the php7.2-pdo_sqlite, and ensured that it is displayed in the php.ini file.
I've also tried completely removing php (and checked using php -v) and then reinstalled php7.2.
When I run php --ini I see /etc/php/7.2/cli/conf.d/20-pdo_mysql.ini, and
/etc/php/7.2/cli/conf.d/20-pdo_sqlite.ini displayed on the list.
I have also given READ permissions to /usr/lib/php/20170718/pdo_sqlite.so incase it was due to a permission error.
What else can I do to resolve the error above? - my goal is to be able to run composer install.
Workaround
If your build pipeline doesn't require sqlite to be installed, you can bypass the check for platform requirements with --ignore-platform-reqs, like so:
composer install --ignore-platform-reqs
From the documentation:
--ignore-platform-reqs: ignore php, hhvm, lib-* and ext-* requirements and force the installation even if the local machine does not fulfill
these. See also the platform config option.
If you have tests that assert sqlite functionality, this isn't a solution, unfortunately.
I face below issue when trying to run composer install:
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/Cellar/php70/7.0.14_7/lib/php/extensions/no-debug-non-zts-20151012/php_intl.dll' - dlopen(/usr/local/Cellar/php70/7.0.14_7/lib/php/extensions/no-debug-non-zts-20151012/php_intl.dll, 9): image not found in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library '/usr/local/Cellar/php70/7.0.14_7/lib/php/extensions/no-debug-non-zts-20151012/php_intl.dll' - dlopen(/usr/local/Cellar/php70/7.0.14_7/lib/php/extensions/no-debug-non-zts-20151012/php_intl.dll, 9): image not found in Unknown on line 0
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Warning: The lock file is not up to date with the latest changes in composer.json. You may be getting outdated dependencies. Run update to update them.
Your requirements could not be resolved to an installable set of packages.
Problem 1
Installation request for magento/magento2-base 2.1.1 -> satisfiable by magento/magento2-base[2.1.1].
magento/magento2-base 2.1.1 requires ext-intl * -> the requested PHP extension intl is missing from your system.
Problem 2
Installation request for magento/product-community-edition 2.1.1 -> satisfiable by magento/product-community-edition[2.1.1].
magento/product-community-edition 2.1.1 requires ext-intl * -> the requested PHP extension intl is missing from your system.
To enable extensions, verify that they are enabled in those .ini files:
- /usr/local/etc/php/7.0/php.ini
- /usr/local/etc/php/7.0/conf.d/ext-mcrypt.ini
You can also run php --ini inside terminal to see which files are used by PHP in CLI mode.
How can I fix this?
Issue
I don't have the slightest clue, how you managed to end up with a Windows DLL on Mac, but...
/usr/local/Cellar/php70/7.0.14_7/lib/php/extensions/
indicates that you are using Mac/Homebrew.
no-debug-non-zts-20151012/php_intl.dll indicates that you are trying to load a Windows DLL
The extension you are trying to use is build/compiled for another operating system. PHP can't load that file.
That's the reason for the Warning: PHP Startup: Unable to load dynamic library.
Solution
Install via Homebrew
brew update
brew install icu4c
or Install via PECL
sudo pecl update-channels
sudo pecl install intl
Then add extension=php_intl.so to your php.ini,
Or that full path mess: extension=/usr/local/Cellar/php70/7.0.14_7/lib/php/extensions/no-debug-non-zts-20151012/php_intl.so
I'm having a problem identical to this one, but the solution provided there isn't working for me.
I downloaded the Symfony 2.4.1 Standard Vendors with Vendors package from the Symfony Downloads Page. After extracting the files and downloading composer.phar, I run php composer.phar install and get this 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
- symfony/icu v1.2.0 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/icu v1.2.0 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.
- Installation request for symfony/icu v1.2.0 -> satisfiable by symfony/icu[v1.2.0].
Following the instructions on the thread linked to above, I updated PEAR libraries and did sudo pear install pecl/intl. (This is on CentOS so I didn't follow the MAMP stuff). This didn't work and I realized I had to do a sudo yum install libicu. After this, sudo pear install pecl/intl worked, and I edited php.ini to add the extension=intl.so line and then restarted the Apache server.
But I'm still getting the same error as above, and in addition, any time I run PHP it gives the warning:
PHP Warning: Module 'intl' already loaded in Unknown on line 0
Looking at the output of phpinfo() I see that the installed intl version is 1.1.0, and the ICU version is 4.2.1 (which explains why Symfony is complaining that it needs 4.4). But when I do /usr/bin/pecl install intl it says
pecl/intl is already installed and is the same as the released version 3.0.0
And the sudo yum install libicu should have installed the latest version.
Is there any way to get the 4.4 version?
For your specific situation, you should specify in your composer.json file that you want to use "symfony/icu": "1.1.*"
See the "ICU and Deployment Problems" section of this page: https://symfony.com/doc/2.4/components/intl.html
you are editing the wrong php.ini file
run this command in console :
php -i | grep php.ini
Configuration File (php.ini) Path => /etc/php5/cli
Loaded Configuration File => /etc/php5/cli/php.ini
edit that file. ( it's the php cli file )