php - Linux Mint 17.3 Rosa 上的 PHP Mongodb 安装问题
问题描述
我是 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
有什么建议吗?我在哪里做错了
解决方案
推荐阅读
- python - 如何在没有省略号的情况下打印所有 eli5.explain_weights() 结果?
- javascript - javascript 找不到使用 XMLHttpRequest 导入的 html/javascript 代码的 id/class
- r - 将一列中的值替换为基于第三列的第二列中的值
- react-native - 我的启动画面不会移动到反应原生的下一个屏幕
- java - 创建模式正则表达式以从 JAVA 中的字符串中提取小时和分钟
- reactjs - React 无法使用 SendGrid 发送电子邮件
- java - 在实现和扩展其他类的类中使用 Java“this”关键字
- kotlin - 我在哪里可以找到 cinterop 工具来创建 def 文件?
- android - 设置 InAppBrowser 或 Themeable Browser 高度以显示应用程序的底部选项卡
- servicestack - 覆盖排队消息的可见性时间 [ServiceStack]