not sure if that would help, but try also installing the MongoDB driver library to the project via composer
composer require mongodb/mongodb
I have installed Homestead with mongodb
In my Homestead.yaml I have :
...
features:
- mongodb: true
...
But running the app I got
Class "MongoDB\Driver\Manager" not found
I have restarted mongod with command
sudo systemctl restart mongod
and I have under vagrant :
$ sudo systemctl status mongod
● mongod.service - MongoDB Database Server
Loaded: loaded (/lib/systemd/system/mongod.service; enabled; vendor preset: enabled)
Active: active (running) since Fri 2023-02-17 12:49:29 UTC; 8min ago
Docs: https://docs.mongodb.org/manual
Main PID: 4856 (mongod)
Memory: 162.8M
CGroup: /system.slice/mongod.service
└─4856 /usr/bin/mongod --config /etc/mongod.conf
Feb 17 12:49:29 homestead systemd[1]: Started MongoDB Database Server.
$ uname -a
Linux homestead 5.4.0-137-generic #154-Ubuntu SMP Thu Jan 5 17:03:22 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
When I have such problem under my ubunyi I salve it with command :
sudo apt-get install php-mongodb
But how can it be salved under homestaed?
in my hosting kubuntu I have :
$ uname -a
Linux master-at-home 5.15.0-53-generic #59~20.04.1-Ubuntu SMP Thu Oct 20 15:10:22 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
$ dpkg -s virtualbox
Package: virtualbox
Status: install ok installed
Version: 6.1.38-dfsg-3~ubuntu1.20.04.1
$ dpkg -s vagrant
Package: vagrant
Status: install ok installed
Version: 2.2.6+dfsg-2ubuntu3
Thank you!
Please or to participate in this conversation.