0
votes

I am using laravel 5.2 & installing Jenssegers\Mongodb using command line. But i am getting following issue.

Problem 1

  • mongodb/mongodb 1.0.2 requires ext-mongodb ^1.1.0 -> the requested PHP extension mongodb is missing from your system.
  • mongodb/mongodb 1.0.2 requires ext-mongodb ^1.1.0 -> the requested PHP extension mongodb is missing from your system.
  • Installation request for mongodb/mongodb (locked at 1.0.2) -> satisfiable by mongodb/mongodb[1.0.2].

    To enable extensions, verify that they are enabled in those .ini files:

    • /etc/php5/cli/php.ini
    • /etc/php5/cli/conf.d/05-opcache.ini
    • /etc/php5/cli/conf.d/10-pdo.ini
    • /etc/php5/cli/conf.d/20-curl.ini
    • /etc/php5/cli/conf.d/20-json.ini
    • /etc/php5/cli/conf.d/20-mongo.ini
    • /etc/php5/cli/conf.d/20-readline.ini You can also run php --ini inside terminal to see which files are used by PHP in CLI mode.

I have already added extension=mongo.so in /etc/php5/cli/php.ini. I am using ubuntu 15.04 and using default apache2 server.

I am using MongoDB 3.2.6 version.

Please let me know what is the issue ?

Thanks

1
Please add ""jenssegers/mongodb": "*"," to your composer.json in root folder of laravel project.It's work for me.Vijay V.

1 Answers

2
votes

Use this code

sudo apt-get install php-mongodb