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
Related
I have a Mac running Catalina. This includes PHP 7.3.11 which was installed by default - I haven't modified this in any way.
% php -v
PHP 7.3.11 (cli) (built: Jun 5 2020 23:50:40) ( NTS )
I was trying to run composer install to set up a CakePHP 4 project locally. This errors with
% composer install
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 cakephp/cakephp 4.1.6 -> satisfiable by cakephp/cakephp[4.1.6].
- cakephp/cakephp 4.1.6 requires ext-intl * -> the requested PHP extension intl is missing from your system.
Problem 2
- cakephp/cakephp 4.1.6 requires ext-intl * -> the requested PHP extension intl is missing from your system.
- cakephp/debug_kit 4.3.7 requires cakephp/cakephp ^4.1 -> satisfiable by cakephp/cakephp[4.1.6].
- Installation request for cakephp/debug_kit 4.3.7 -> satisfiable by cakephp/debug_kit[4.3.7].
I've created /etc/php.ini and I can see this is being loaded:
% php --ini
Configuration File (php.ini) Path: /etc
Loaded Configuration File: /etc/php.ini
Scan for additional .ini files in: (none)
Additional .ini files parsed: (none)
The php.ini I created was a copy of php.ini.default which came with my Mac. This had the following line commented out
;extension=intl
I've uncommented this and saved as /etc/php.ini.
Now, I'm getting another error when executing php which says:
PHP Warning: PHP Startup: Unable to load dynamic library 'intl' (tried: /usr/lib/php/extensions/no-debug-non-zts-20180731/intl (dlopen(/usr/lib/php/extensions/no-debug-non-zts-20180731/intl, 0x0009): dlopen(): file not found: /usr/lib/php/extensions/no-debug-non-zts-20180731/intl), /usr/lib/php/extensions/no-debug-non-zts-20180731/intl.so (dlopen(/usr/lib/php/extensions/no-debug-non-zts-20180731/intl.so, 0x0009): dlopen(): file not found: /usr/lib/php/extensions/no-debug-non-zts-20180731/intl.so)) in Unknown on line 0
How do you get intl extension installed under this environment? I've read that it should be included anyway by default in this version of PHP. Is this some Apple specific problem, or is there a workaround?
I found a solution (https://medium.com/#agaetis/solved-install-intl-php-extension-for-xampp-and-magento-for-macos-mojave-41fa42336fc6) using brew but this is for PHP 7.1, and doesn't work in this case.
You can use a docker image with apache and php (google : docker apache php github), set your project as a volume of your docker container with an external database or use this docker to build a new image with a DB.
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've tried many times to install couchbase client using this tutorial : http://trondn.blogspot.ro/2013/04/couchbase-php-xampp-and-windows.html ,, but is not working,,
when i run composer update i get the following errors
PHP Warning: PHP Startup: Unable to load dynamic library 'C:\xampp\php\ext\php_couchbase.dll' - The specified module could not be found.
in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library 'C:\xampp\php\ext\php_couchbase.dll' - The specified module could not be found.
in Unknown on line 0
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
- ytake/laravel-couchbase 0.5.7 requires ext-couchbase ^2.2.2 -> the requested PHP extension couchbase is missing from your system.
- ytake/laravel-couchbase 0.5.6 requires ext-couchbase >=2.2.0 -> the requested PHP extension couchbase is missing from your system.
- ytake/laravel-couchbase 0.5.5 requires ext-couchbase >=2.2.0 -> the requested PHP extension couchbase is missing from your system.
- ytake/laravel-couchbase 0.5.3 requires ext-couchbase >=2.2.0 -> the requested PHP extension couchbase is missing from your system.
- ytake/laravel-couchbase 0.5.2 requires ext-couchbase >=2.2.0 -> the requested PHP extension couchbase is missing from your system.
- ytake/laravel-couchbase 0.5.1 requires ext-couchbase >=2.2.0 -> the requested PHP extension couchbase is missing from your system.
- Installation request for ytake/laravel-couchbase ^0.5 -> satisfiable by ytake/laravel-couchbase[0.5.1, 0.5.2, 0.5.3, 0.5.5, 0.5.6, 0.5.7].
what should i do? please i need help
Official PHP SDK binaries for Windows published on
https://developer.couchbase.com/server/other-products/release-notes-archives/php-sdk
Make sure you put php_couchbase.dll into your extensions directory, and libcouchbase.dll into your SAPI PATH (or process current directory).
The PHP exe file you specified did not run correctly:
C:\xampp\php\php.exe
The php.ini used by your command-line PHP is: C:\xampp\php\php.ini
Program Output:
Warning: PHP Startup: mongo: Unable to initialize module
Module compiled with module API=20121212
PHP compiled with module API=20131226
These options need to match in Unknown on line 0
Update
Composer can't find mongodb extension in php
C:\wamp\www\phpmongodb>composer require "mongodb/mongodb=^1.0.0"
You are running composer with xdebug enabled. This has a major impact on runtime performance. See https://getcomposer.org/xdebug
./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
- mongodb/mongodb 1.0.2 requires ext-mongodb ^1.1.0 -> the requested PHP extension mongodb is missing from your system.
- mongodb/mongodb 1.0.2 requires ext-mongodb ^1.1.0 -> the requested PHP extension mongodb is missing from your system.
- 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.
- mongodb/mongodb 1.0.2 requires ext-mongodb ^1.1.0 -> the requested PHP extension mongodb is missing from your system.
- Installation request for mongodb/mongodb ^1.0.0 -> satisfiable by mongodb/mongodb[1.0.0, 1.0.1, 1.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 used by PHP in CLI mode.
Installation failed, reverting ./composer.json to its original content.
Warning: PHP Startup: mongo: Unable to initialize module
Module compiled with module API=20121212
PHP compiled with module API=20131226
These options need to match in Unknown on line 0
Problem
This is a PHP Extension installation issue.
The error means, that the PHP Extension mongo doesn't fit your PHP version.
It's incompatible.
Solution
The solution is to check your PHP version with php -v and then install the matching "mongo" extension.
PHP Extension Mongo https://pecl.php.net/package/mongo + http://php.net/mongo/
Reminder: The PHP extension Mongo is deprecated. The replacement is MongoDB https://pecl.php.net/package/mongodb + http://php.net/mongodb/
Another simple solution is to delete the php_mongo.dll from the extension folder and remove it from php.ini to allow a proper PHP start.
After that, Composer and all other PHP CLI applications should work normally.
Answer for the updated question
the requested PHP extension mongodb is missing from your system
Now, mongodb is missing:
Download
drop php_mongodb.dll into the extension folder
edit your php.ini to include the extension.
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 )