a) If your git version is not recent enough, as can happen e.g. on Ubuntu 12.04 LTS, git submodule --init won't exist
In that case use:
git submodule init
git submodule update
b) make install does not create a mongodb.conf configuration file to support the debian/ubuntu PHP versions phpenmod/phpdismod commands. To have them work:
- do not add the extension=mongodb.so line to php.ini
- add it to a mongodb.ini file in the PHP mods-available directory
- the commands will then work for this extension
c) if you have multiple versions of PHP on a system such as b), the phpenmod/phpdismod commands may fail if the extension is not built for the default PHP CLI version. To have it be enabled for a specific version, use the -v argument, like
phpenmod -v php7.1 mongodb