Linux Mint 17.3 Rosa上的PHP Mongodb安装问题

时间:2018-10-12 12:16:43

标签: php mongodb composer-php linuxmint

我是mongodb的新手,

我正在遵循一个教程并逐步进行,我安装了mongodb并从shell中访问它。

然后我正在执行php mongodb安装部分。 我正在通过composer进行安装,安装composer并运行以下命令

composer require mongodb/mongodb

我在终端中得到以下错误输出。

$ composer require mongodb/mongodb
Using version ^1.4 for mongodb/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
    - mongodb/mongodb 1.4.2 requires ext-mongodb ^1.5.0 -> the requested PHP extension mongodb is missing from your system.
    - mongodb/mongodb 1.4.1 requires ext-mongodb ^1.5.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.
    - Installation request for mongodb/mongodb ^1.4 -> satisfiable by mongodb/mongodb[1.4.0, 1.4.1, 1.4.2].

  To enable extensions, verify that they are enabled in your .ini files:
    - /etc/php5/cli/php.ini
    - /etc/php5/cli/conf.d/05-opcache.ini
    - /etc/php5/cli/conf.d/10-pdo.ini
    - /etc/php5/cli/conf.d/20-json.ini
    - /etc/php5/cli/conf.d/20-mysql.ini
    - /etc/php5/cli/conf.d/20-mysqli.ini
    - /etc/php5/cli/conf.d/20-pdo_mysql.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.

在这里,我将此内容添加到了php.ini文件中并重新启动了apache文件。

扩展名= mongodb.so

PHP版本-PHP 5.5.9和Linux Mint 17.3 Rosa

有什么建议吗? 我在哪里做错了

0 个答案:

没有答案