Eldeeno
Eldeeno

Reputation: 301

MongoDB Class 'MongoDB\Driver\Manager' not found" in Laravel 5.7, php 7.3 (on Ubuntu 20.4 and Apache)

I am running a laravel 5.7 app on apache server which i have tried on the different php versions(7.2, 7.3) i have installed on my ubuntu system. Upon hitting the apps url in the browser i get this error Class 'MongoDB\Driver\Manager' not found I have been battling with this for a while now and have tried so many solutions out there but it still persists. I have mongodb extension installed on all the php distributions. Funny enough, When i tried getting a record from the db using tinker it works very fine.

Upvotes: 1

Views: 1850

Answers (1)

Isaac Limón
Isaac Limón

Reputation: 2058

You must install php extension separatly; is not a library

https://www.php.net/manual/en/mongodb.installation.manual.php

In ubuntu simple run

sudo apt-get install php-mongodb

Upvotes: 2

Related Questions