Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

beingjungshahi's avatar

Install php mongodb extension in mac osx sierra

Hello everyone, I have a php version 7.0 installed and i installed php mongodb extension with brew install php70-mongodb but i cannot install mongo db composer package it gives following error

  • mongodb/mongodb v1.1.x-dev requires ext-mongodb ^1.2.0 -> the requested PHP extension mongodb is missing from your system.
0 likes
4 replies
aurawindsurfing's avatar

Hi, I woud always suggest not installing your work enviroment directly on your machine. Use instead a laradock: https://github.com/laradock/laradock

It will take care of most of the things so you do not have to think about it. That is why people like docker ;-)

1 like
jimmck's avatar

Hi,

do brew list | grep php71 or php70 whichever you are at or just brew list

Next do php -m | grep mongo

Next do php -i | grep mongo

lets see what ya got???

1 like
jimmck's avatar

Oh and do a php -v and then which php

1 like
beingjungshahi's avatar

Thank you for reply guys. I restarted my machine and it worked.

Please or to participate in this conversation.