I want to install a package using composer for my PHP project.
I tried this first:
composer require jenssegers/mongodb --ignore-platform-reqs
But it doesn't work with this method. Therefore, I removed the mongodb and after install again.
But it doesn't work this method.
composer install
Problem 1
- Installation request for mongodb/mongodb 1.4.2 -> satisfiable by mongodb/mongodb[1.4.2].
- mongodb/mongodb 1.4.2 requires ext-mongodb ^1.5.0 -> the requested PHP extension mongodb is missing from your system.
Problem 2
- mongodb/mongodb 1.4.2 requires ext-mongodb ^1.5.0 -> the requested PHP extension mongodb is missing from your system.
- jenssegers/mongodb v3.5.0 requires mongodb/mongodb ^1.0.0 -> satisfiable by mongodb/mongodb[1.4.2].
- Installation request for jenssegers/mongodb v3.5.0 -> satisfiable by jenssegers/mongodb[v3.5.0].
Related
Here are the errors that I get when i type :
composer require doctrine/mongodb-odm-bundle
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Restricting packages listed in "symfony/symfony" to "5.1.*"
Your requirements could not be resolved to an installable set of packages.
Problem 1
- doctrine/mongodb-odm 2.1.1 requires ext-mongodb ^1.5 -> the requested PHP extension mongodb is missing from your system.
- doctrine/mongodb-odm 2.1.0 requires ext-mongodb ^1.5 -> the requested PHP extension mongodb is missing from your system.
- doctrine/mongodb-odm 2.0.6 requires ext-mongodb ^1.5 -> the requested PHP extension mongodb is missing from your system.
- doctrine/mongodb-odm 2.0.5 requires ext-mongodb ^1.5 -> the requested PHP extension mongodb is missing from your system.
- doctrine/mongodb-odm 2.0.4 requires ext-mongodb ^1.5 -> the requested PHP extension mongodb is missing from your system.
- doctrine/mongodb-odm 2.0.3 requires ext-mongodb ^1.5 -> the requested PHP extension mongodb is missing from your system.
- doctrine/mongodb-odm 2.0.2 requires ext-mongodb ^1.5 -> the requested PHP extension mongodb is missing from your system.
- doctrine/mongodb-odm 2.0.1 requires ext-mongodb ^1.5 -> the requested PHP extension mongodb is missing from your system.
- doctrine/mongodb-odm 2.0.0 requires ext-mongodb ^1.5 -> the requested PHP extension mongodb is missing from your system.
- doctrine/mongodb-odm-bundle 4.2.0 requires doctrine/mongodb-odm ^2.0.0 -> satisfiable by doctrine/mongodb-odm[2.0.0, 2.0.1, 2.0.2, 2.0.3, 2.0.4, 2.0.5, 2.0.6, 2.1.0, 2.1.1].
- Installation request for doctrine/mongodb-odm-bundle ^4.2.0 -> satisfiable by doctrine/mongodb-odm-bundle[4.2.0].
To enable extensions, verify that they are enabled in your .ini files:
- /usr/local/etc/php/7.4/php.ini
- /usr/local/etc/php/7.4/conf.d/ext-opcache.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.
You need install extension mongodb. If you using ubuntu you can try command below:
sudo apt install php7.4-mongodb
Hope it's help you.
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,
Every time when i am running "composer require jenssegers/mongodb ^3.0" this command in my command prompt. I am just getting below error can any one suggest. Thanks in advance.
Installation failed, reverting ./composer.json to its original content.
D:\XAMPP\htdocs\library>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 b
y mongodb/mongodb[1.0.0, 1.0.1].
- jenssegers/mongodb v3.0.1 requires mongodb/mongodb ^1.0.0 -> satisfiable b
y mongodb/mongodb[1.0.0, 1.0.1].
- jenssegers/mongodb v3.0.2 requires mongodb/mongodb ^1.0.0 -> satisfiable b
y mongodb/mongodb[1.0.0, 1.0.1].
- mongodb/mongodb 1.0.1 requires ext-mongodb ^1.1.0 -> the requested PHP ext
ension mongodb is missing from your system.
- mongodb/mongodb 1.0.0 requires ext-mongodb ^1.1.0 -> the requested PHP ext
ension mongodb is missing from your system.
- Installation request for jenssegers/mongodb ^3.0 -> satisfiable by jensseg
ers/mongodb[v3.0.0, v3.0.1, v3.0.2].
To enable extensions, verify that they are enabled in those .ini files:
- D:\XAMPP\php\php.ini
You can also run php --ini inside terminal to see which files are used by PH
P in CLI mode.
try this
composer require jenssegers/mongodb --ignore-platform-reqs
I'm new using MongoDB in laravel, I want to use laravel 4.2 with MongoDB but I have this problem:
> C:\xampp\htdocs\laravel-mongo>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 has the wrong version (1.0.0) installed.
- mongodb/mongodb 1.0.0 requires ext-mongodb ^1.1.0 -> the requested PHP extension mongodb has the wrong version (1.0.0) installed.
- Installation request for jenssegers/mongodb ^3.0 -> satisfiable by jenssegers/mongodb[v3.0.0, v3.0.1, v3.0.2].
To enable extensions, verify that they are enabled in those .ini files:
- C:\xampp\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.
For Laravel 4.2 you would need 2.0.x version of the package
composer require jenssegers/mongodb ^2.0
When you don't specify the version composer grabs the latest stable release by default, which currently happens to be v3.0.2.
This happened to me (for Lumen 5) due to an old mongo installation.
From http://php.net/manual/en/class.mongoclient.php:
Warning: This extension that defines this class is deprecated. Instead,
the MongoDB extension should be used.
Following next steps I was able to get jenssegers/mongodb properly working:
sudo apt-get install php5-dev
sudo pecl install mongodb
Then add to /etc/php5/cli/php.ini or similar:
extension=mongodb.so
And then install the driver
composer require jenssegers/mongodb
ref: http://haafiz.me/development/installing-mongodb-driver-mongoclient-for-php-on-ubuntu
installed laravel template built on version 4.2 , when i make composer (install / update) I still have this error with composer .
Problem 1
- Installation request for d11wtq/boris v1.0.10 -> satisfiable by d11wtq/boris[v1.0.10].
- d11wtq/boris v1.0.10 requires ext-pcntl * -> the requested PHP extension pcntl is missing from your system.
Problem 2
- d11wtq/boris v1.0.10 requires ext-pcntl * -> the requested PHP extension pcntl is missing from your system.
- laravel/framework v4.2.17 requires d11wtq/boris ~1.0 -> satisfiable by d11wtq/boris[v1.0.10].
- Installation request for laravel/framework v4.2.17 -> satisfiable by laravel/framework[v4.2.17].
This is because the package d11wtq/boris needs the Process Control Extension (pcntl) of PHP. To install pcntl compile the CGI- or CLI version of PHP with --enable-pcntl.
Note:
Currently, this module will not function on non-Unix platforms (Windows).
So hopefully you use something like linux or mac os.