Search code examples
phpmongodbamazon-ec2pecl

How do I add the PHP MongoDB driver to Amazon AMI?


Typically, one would sudo pecl install mongodb, however, I need php-devel to do this. And I can't install php-devel because it conflicts with Amazon's pre-installed PHP.

How can I install the PHP driver for MongoDB on my Amazon AMI EC2?


Solution

  • I had the same problem on AWS using Amazon Linux and Mongodb PHP driver. My problem was that i was using php 5.6 and when i tryed to install php-devel it returned me the error that this was already pre-installed on my system. To solve the problem i installed the php56-devel and then sudo pecl install mongodb

    Hope it help.