After googling for about an hour can\'t find any solution that works for me. I\'m on OS X 10.9 Mavericks.
Here is what the terminal says:
$ sudo pecl
I found this article very helpful. Saved a lot of time after I wasted a lot of time to check other links.
The thing is MAMP does not ship with all PHP sources to compile pecl mongo file and create mongo.so. All what you need is download php for respective version you are using. I was using php version 5.6.10
. I checked php.net site that was having 5.6.13
version. I downloaded sources for this version from PhP.net. Executed "sudo pecl install mongo
" again and it worked.