Installation of the mongodb extension requires libssl-dev and pkg-config installed. This requirement is only documented within the php.net module page, which our documentation links to. The php.net requirements page also appears to show more information than our docs.
We should consider paraphasing the mongodb extension installation steps in our installation docs, which should also clearly indicate the requirements.