dszsajhd237437 2016-01-31 03:41
浏览 103
已采纳

如何获得旧版本的mongodb?

So I did sudo apt-get install php5-mongo and when I do composer require "mongodb/mongodb=~1.0.0" I get this:

  Problem 1
    - Installation request for mongodb/mongodb ~1.0.0 -> satisfiable by mongodb/mongodb[1.0.0].
    - mongodb/mongodb 1.0.0 requires ext-mongodb ^1.1.0 -> the requested PHP extension mongodb is missing from your system.

When I do dpkg -s php5-mongo I get this:

Package: php5-mongo
Status: install ok installed
Priority: optional
Section: php
Installed-Size: 326
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Architecture: amd64
Source: php-mongo
Version: 1.4.5-1build1
Depends: libc6 (>= 2.15), phpapi-20121212
Conffiles:
 /etc/php5/mods-available/mongo.ini f2a4848fe0856c5bbaf2afc4aee7a1b9
Description: MongoDB database driver
 This package provides an interface for communicating with the MongoDB database
 in PHP.
Original-Maintainer: Laszlo Boszormenyi (GCS) <gcs@debian.org>
Homepage: http://www.mongodb.org/display/DOCS/PHP+Language+Center

So is the problem my ext-mongodb install is too new? Based on the output of dpkg I'd guess I'm running ext-mongodb 1.4.5 instead of the 1.1.0 required by https://github.com/mongodb/mongo-php-library

edit: echo phpversion('mongo') gets me 1.4.5 as well.

  • 写回答

2条回答 默认 最新

  • dongluzhi5208 2016-01-31 04:27
    关注

    I just uninstalled the apt-get installed version of php5-mongo and installed it with pecl per http://mongodb.github.io/mongo-php-driver/#installation.

    That was for sure more annoying since I had to manually install all of the dependencies. None-the-less, if apt-get isn't installing anything usable in Ubuntu 14.04 it seems like they ought to fix it..

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥20 matlab计算中误差
  • ¥15 对于相关问题的求解与代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 信号傅里叶变换在matlab上遇到的小问题请求帮助
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 电脑桌面设定一个区域禁止鼠标操作
  • ¥15 求NPF226060磁芯的详细资料
  • ¥15 使用R语言marginaleffects包进行边际效应图绘制
  • ¥20 usb设备兼容性问题
  • ¥15 错误(10048): “调用exui内部功能”库命令的参数“参数4”不能接受空数据。怎么解决啊