【问题标题】:uninstall mongodb php driver and install a different version卸载mongodb php驱动并安装不同的版本
【发布时间】:2018-12-05 00:19:34
【问题描述】:

我正在使用 Ubuntu Xampp (Lampp),目前在 MongoDB 1.5.3 驱动程序上。

我需要降级到1.4.5,但是当重新安装降级的驱动程序时,phpinfo() 没有变化。是的,我已经重启了 Apache。

那么,如何卸载当前版本并安装降级版本?

【问题讨论】:

    标签: php mongodb ubuntu


    【解决方案1】:

    更新:2018-06-20:

    PECL 包mongo 现已弃用,您应该改用mongodb 包:

    sudo pecl install -f mongodb-1.4.4

    原答案

    您可以使用 pecl 升级到特定版本的驱动程序:

    sudo pecl install -f mongo-1.4.5

    如果您收到pecl: command not found 错误,您将需要安装 PEAR 包:

    sudo apt-get update && sudo apt-get install php-pear
    

    您可以使用此命令检查您是否安装了正确的版本:

    sudo pecl info mongo
    

    或者你可以直接检查php配置:

    php -i | grep -A 1 MongoDB
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-06-03
      • 1970-01-01
      • 2014-07-19
      • 1970-01-01
      • 2021-05-24
      • 1970-01-01
      • 2017-01-07
      • 1970-01-01
      相关资源
      最近更新 更多