Ubuntu установить PHP MongoDB Extension

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

//install library through composer
composer require mongodb/mongodb

Headache reliver