卸载mongodb php驱动程序并安装其他版本 [英] uninstall mongodb php driver and install a different version
问题描述
我正在使用Ubuntu Xampp(Lampp),目前在MongoDB 1.5.3
驱动程序上.
I'm using Ubuntu Xampp (Lampp) and currently on MongoDB 1.5.3
driver.
我需要降级到1.4.5
,但是当重新安装降级的驱动程序时,它在phpinfo()
中不会更改.是的,我已经重新启动了Apache.
I need to downgrade to 1.4.5
, but when re-installed the downgraded driver, it does not change in phpinfo()
. Yes, I have restarted Apache.
那么,如何卸载当前版本并安装降级版本?
So, how do I uninstall the current one and install the downgraded version?
推荐答案
更新:2018-06-20:
PECL软件包 mongo 已被弃用,您应该使用
PECL package mongo is now deprecated, you should use mongodb package instead:
sudo pecl install -f mongodb-1.4.4
原始答案
您可以使用pecl升级到特定版本的驱动程序:
You can upgrade to a specific version of a driver by using pecl:
sudo pecl install -f mongo-1.4.5
如果出现pecl: command not found
错误,则需要安装PEAR软件包:
If you get a pecl: command not found
error you will need to install PEAR package:
sudo apt-get update && sudo apt-get install php-pear
您可以使用此命令来检查您是否安装了正确的版本:
You can use this command to check that you have the correct version installed:
sudo pecl info mongo
或者您可以直接通过以下方式检查php配置:
Or you can check php configuration directly with:
php -i | grep -A 1 MongoDB
这篇关于卸载mongodb php驱动程序并安装其他版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!