无法将“ jenssegers / mongodb”安装到我的项目中

时间:2019-07-19 17:29:48

标签: php laravel mongodb lumen

我从git仓库克隆了我的项目,并尝试安装软件包(composer安装),但出现错误:

Problem 1
- jenssegers/mongodb v3.5.0 requires mongodb/mongodb ^1.0.0 -> satisfiable by mongodb/mongodb[1.0.0, 1.0.0-alpha1, 1.0.0-beta1, 1.0.0-beta2, 1.0.1, 1.0.2, 1.0.3, 1.0.4, 1.0.5, 1.1.0, 1.1.0-alpha1, 1.1.1, 1.1.2, 1.2.0, 1.2.0-alpha1, 1.3.0, 1.3.1, 1.3.2, 1.4.0, 1.4.1, 1.4.2, 1.4.3, 1.5.x-dev, v1.0.x-dev, v1.1.x-dev, v1.2.x-dev, v1.3.x-dev, v1.4.x-dev].
- mongodb/mongodb v1.4.x-dev requires ext-mongodb ^1.5.0 -> the requested PHP extension mongodb is missing from your system.

...

To enable extensions, verify that they are enabled in your .ini files:
- /usr/local/etc/php/7.3/php.ini
- /usr/local/etc/php/7.3/conf.d/ext-opcache.ini
- /usr/local/etc/php/7.3/conf.d/php-memory-limits.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.
  

我在“ php.ini”中添加了“ extension = mongo.so”,但没有帮助。我需要做什么来解决此问题?

MacOS Mojave,Homebrew,Valet,php @ 7.3,lumen @ 5.6

1 个答案:

答案 0 :(得分:0)

尝试从php安装mongodb lib

  

sudo apt-get install php-mongodb