简体   繁体   中英

Install Legacy Version of PHP Driver for MongoDB on Amazon Linux

I am attempting to install Learning Locker on an Amazon Linux site on AWS. I have been following the step-by-step directions on this site , which has been helpful till now. Unfortunately now I am stuck.

Learning Locker requires the older version of the Mongo driver (mongo.so) for PHP. I think this is the latest version . However if I try to install the driver using pecl it will either install the new version of the driver (mongodb.so) or if I specific "pecl install mongo" I get an error that this version is depreciated.

At this point I need to:

  1. Uninstall the mongodb.so driver that is installed currently.
  2. Install the legacy mongo.so driver.

I have searched the Internet but I have not found what I need to know how to uninstall the existing driver and install the legacy driver.

Suggestions? Any insight will be appreciated. Thanks!!!

With more research I was able to learn how to install an older driver with pecl.

pecl search mongo

Retrieving data...0%
.Matched packages, channel pecl.php.net:
=======================================
Package Stable/(Latest) Local
mongo   1.6.14 (stable) 1.6.14 MongoDB database driver
mongodb 1.2.8 (stable)  1.2.7  MongoDB driver for PHP

sudo pecl install mongo-1.6.14

This worked and I was able to run Composer to install Learning Locker.

I still need to uninstall mongodb.so but that is a work in progress.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM