Missing required php extension mongodb

Правильное подключение mongodb в laravel?

Добрый день, уже пару часов пытаюсь подключить в мой laravel проект библиотеку, ругается вот такой ошибкой и не знаю куда копать дальше!

forge@limitless-snowflake:~$ composer require jenssegers/mongodb Using version ^3.3 for jenssegers/mongodb ./composer.json has been created 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.3.0 requires mongodb/mongodb ^1.0.0 -> satisfiable by mongodb/mongodb[1.0.0, 1.0.1, 1.0.2, 1.0.3, 1.0.4, 1.0.5, 1.1.0, 1.1.1, 1.1.2, 1.2.0]. - jenssegers/mongodb v3.3.1 requires mongodb/mongodb ^1.0.0 -> satisfiable by mongodb/mongodb[1.0.0, 1.0.1, 1.0.2, 1.0.3, 1.0.4, 1.0.5, 1.1.0, 1.1.1, 1.1.2, 1.2.0]. - mongodb/mongodb 1.2.0 requires ext-mongodb ^1.3.0 -> the requested PHP extension mongodb is missing from your system. - mongodb/mongodb 1.1.2 requires ext-mongodb ^1.2.0 -> the requested PHP extension mongodb is missing from your system. - mongodb/mongodb 1.1.1 requires ext-mongodb ^1.2.0 -> the requested PHP extension mongodb is missing from your system. - mongodb/mongodb 1.1.0 requires ext-mongodb ^1.2.0 -> the requested PHP extension mongodb is missing from your system. - mongodb/mongodb 1.0.5 requires ext-mongodb ^1.1.0 -> the requested PHP extension mongodb is missing from your system. - mongodb/mongodb 1.0.4 requires ext-mongodb ^1.1.0 -> the requested PHP extension mongodb is missing from your system. - mongodb/mongodb 1.0.3 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. - Installation request for jenssegers/mongodb ^3.3 -> satisfiable by jenssegers/mongodb[v3.3.0, v3.3.1]. To enable extensions, verify that they are enabled in your .ini files: - /etc/php/7.2/cli/php.ini - /etc/php/7.2/cli/conf.d/10-mysqlnd.ini - /etc/php/7.2/cli/conf.d/10-opcache.ini - /etc/php/7.2/cli/conf.d/10-pdo.ini - /etc/php/7.2/cli/conf.d/15-xml.ini - /etc/php/7.2/cli/conf.d/20-bcmath.ini - /etc/php/7.2/cli/conf.d/20-calendar.ini - /etc/php/7.2/cli/conf.d/20-ctype.ini - /etc/php/7.2/cli/conf.d/20-curl.ini - /etc/php/7.2/cli/conf.d/20-dom.ini - /etc/php/7.2/cli/conf.d/20-exif.ini - /etc/php/7.2/cli/conf.d/20-fileinfo.ini - /etc/php/7.2/cli/conf.d/20-ftp.ini - /etc/php/7.2/cli/conf.d/20-gd.ini - /etc/php/7.2/cli/conf.d/20-gettext.ini - /etc/php/7.2/cli/conf.d/20-iconv.ini - /etc/php/7.2/cli/conf.d/20-igbinary.ini - /etc/php/7.2/cli/conf.d/20-imap.ini - /etc/php/7.2/cli/conf.d/20-intl.ini - /etc/php/7.2/cli/conf.d/20-json.ini - /etc/php/7.2/cli/conf.d/20-mbstring.ini - /etc/php/7.2/cli/conf.d/20-msgpack.ini - /etc/php/7.2/cli/conf.d/20-mysqli.ini - /etc/php/7.2/cli/conf.d/20-pdo_mysql.ini - /etc/php/7.2/cli/conf.d/20-pdo_pgsql.ini - /etc/php/7.2/cli/conf.d/20-pdo_sqlite.ini - /etc/php/7.2/cli/conf.d/20-pgsql.ini - /etc/php/7.2/cli/conf.d/20-phar.ini - /etc/php/7.2/cli/conf.d/20-posix.ini - /etc/php/7.2/cli/conf.d/20-readline.ini - /etc/php/7.2/cli/conf.d/20-shmop.ini - /etc/php/7.2/cli/conf.d/20-simplexml.ini - /etc/php/7.2/cli/conf.d/20-soap.ini - /etc/php/7.2/cli/conf.d/20-sockets.ini - /etc/php/7.2/cli/conf.d/20-sqlite3.ini - /etc/php/7.2/cli/conf.d/20-sysvmsg.ini - /etc/php/7.2/cli/conf.d/20-sysvsem.ini - /etc/php/7.2/cli/conf.d/20-sysvshm.ini - /etc/php/7.2/cli/conf.d/20-tokenizer.ini - /etc/php/7.2/cli/conf.d/20-wddx.ini - /etc/php/7.2/cli/conf.d/20-xmlreader.ini - /etc/php/7.2/cli/conf.d/20-xmlwriter.ini - /etc/php/7.2/cli/conf.d/20-xsl.ini - /etc/php/7.2/cli/conf.d/20-zip.ini - /etc/php/7.2/cli/conf.d/25-memcached.ini You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode. Installation failed, deleting ./composer.json.

Что в переводе на русский означает «в вашем ПХП не установлено расширение по имени mongodb«. Установите его и будет Вам счастье (или новая ошибка 🙂

Читайте также:  Content block html css

Обычно решается как-то так: apt install php7.2-mongodb (для Debian/Ubuntu)

Источник

Saved searches

Use saved searches to filter your results more quickly

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

requires ext-mongodb ^1.5.0 #874

requires ext-mongodb ^1.5.0 #874

Comments

MongoDB extension version => 1.5.1 libbson bundled version => 1.11.0 libmongoc bundled version => 1.11.0 

I have an issue with composer when I do composer install

- mongodb/mongodb 1.4.0 requires ext-mongodb ^1.5.0 -> the requested PHP extension mongodb is missing from your system. - mongodb/mongodb 1.3.2 requires ext-mongodb ^1.4.0 -> the requested PHP extension mongodb is missing from your system. - mongodb/mongodb 1.3.1 requires ext-mongodb ^1.4.0 -> the requested PHP extension mongodb is missing from your system. - mongodb/mongodb 1.3.0 requires ext-mongodb ^1.4.0 -> the requested PHP extension mongodb is missing from your system. - mongodb/mongodb 1.4.0 requires ext-mongodb ^1.5.0 -> the requested PHP extension mongodb is missing from your system. 
mongodb MongoDB support enabled MongoDB extension version 1.5.1 MongoDB extension stability stable libbson bundled version 1.11.0 libmongoc bundled version 1.11.0 libmongoc SSL enabled libmongoc SSL library Secure Transport libmongoc crypto enabled libmongoc crypto library Common Crypto libmongoc crypto system profile disabled libmongoc SASL enabled libmongoc ICU disabled libmongoc compression enabled libmongoc compression snappy disabled libmongoc compression zlib enabled 

If I try to install mongodb with composer

composer require mongodb/mongodb I have that error

If I use ( and I don’t want use this method )

composer install --ignore-platform-reqs 

But in This way I can’t use some functionality, like aggregateCursor

Attempted to call an undefined method named "aggregateCursor" of class "MongoDB\Collection" 

or I can’t use
$m = new \MongoClient();

Attempted to load class «MongoClient» from the global namespace.

For connect to mongoDb I have to use

I Use Symfony, but I don’t think that it’s relevant

Composer version 1.6.5 2018-05-04 11:44:5

PHP 7.2.1 (cli) (built: Jan 15 2018 12:20:50) ( NTS )
Copyright (c) 1997-2017 The PHP Group

The text was updated successfully, but these errors were encountered:

Источник

Saved searches

Use saved searches to filter your results more quickly

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

why it’s not working in laravel 7.0 version #2006

why it’s not working in laravel 7.0 version #2006

Comments

It gives a lots of issues

Problem 1
— mongodb/mongodb 1.6.0 requires ext-mongodb ^1.7 -> the requested PHP extension mongodb is missing from your system.
— mongodb/mongodb 1.6.0 requires ext-mongodb ^1.7 -> the requested PHP extension mongodb is missing from your system.
— mongodb/mongodb 1.6.0 requires ext-mongodb ^1.7 -> the requested PHP extension mongodb is missing from your system.
— Installation request for mongodb/mongodb (locked at 1.6.0, required as ^1.6) -> satisfiable by mongodb/mongodb[1.6.0].

To enable extensions, verify that they are enabled in your .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.
PS C:\xampp\htdocs\example> pecl install mongodb
^CTerminate batch job (Y/N)? y
PS C:\xampp\htdocs\example> composer require jenssegers/mongodb:dev-develop
./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.6.0 requires ext-mongodb ^1.7 -> the requested PHP extension mongodb is missing from your system.
— mongodb/mongodb 1.6.0 requires ext-mongodb ^1.7 -> the requested PHP extension mongodb is missing from your system.
— mongodb/mongodb 1.6.0 requires ext-mongodb ^1.7 -> the requested PHP extension mongodb is missing from your system.
— Installation request for mongodb/mongodb (locked at 1.6.0, required as ^1.6) -> satisfiable by mongodb/mongodb[1.6.0].

To enable extensions, verify that they are enabled in your .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.

The text was updated successfully, but these errors were encountered:

Источник

Оцените статью