I have moved this post to a new topic, since the thread it was posted in was for an entirely different error message.
Did you follow the Ubuntu installation instructions carefully?
Note near the beginning the two additional packages that must be installed for MongoDB support: php-pear
and php5-dev
.
$ sudo apt-get install php-pear php5-dev
Then, later on in the install guide under the heading Configuring MongoDB Support,
$ sudo pecl install mongo
You should restart Apache after confirming you’ve followed these steps, and try again.