Ubuntu instaluj rozszerzenie PHP MongoDB

sudo pecl install mongodb
//add to php.ini
extension=mongodb.so

//install library through composer
composer require mongodb/mongodb

Headache reliver