1

I'm trying to install the MongoDB PHP driver, but I'm getting an unexpected error. When I run: pecl install mongo I get this:

downloading mongo-1.4.5.tgz ...

Starting to download mongo-1.4.5.tgz (141,417 bytes)

..............................done: 141,417 bytes

84 source files, building

running: phpize

Configuring for:

PHP Api Version: 20090626

Zend Module Api No: 20090626

Zend Extension Api No: 220090626

shtool at '/tmp/pear/temp/mongo/build/shtool' does not exist or is not executable.

Make sure that the file exists and is executable and then rerun this script.

If the command failed with 'phpize: not found' then you need to install php5-dev package

You can do it by running 'apt-get install php5-dev' as a root user

ERROR: `phpize' failed

when I try to install php5-dev, it says that I already have the latest version, same thing if I run: apt-get install php5-dev php5-cli php-pear

Thank you.

jmikola
  • 6,892
  • 1
  • 31
  • 61
Waiyl Karim
  • 2,810
  • 21
  • 25
  • Not really a SO error more a super user or server fault I gues. Also if you're running a debian or redhat based distro you can just do `apt-get install mongo` or `yum install mongo` and it'll do the work for you. You have 2 errors both because of missing dependancies – Dave Dec 10 '13 at 12:25
  • @Dave: the OP was attempting to install the PHP driver, not MongoDB itself. OP: I assume this may be due to PECL unpacking into `/tmp`, which may be mounted with `noexec`. This is answered in more detail [here](http://stackoverflow.com/a/17332287/162228). Also, while checking that you have required packages installed, ensure `build-essential` is also in place. – jmikola Jan 02 '14 at 22:32

1 Answers1

-3

Why are you trying to download the tgz and extract it manually (and a very old one at that) when there is a repository for it. Here are the installation instructions: http://docs.mongodb.org/manual/tutorial/install-mongodb-on-ubuntu/

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | sudo tee /etc/apt/sources.list.d/mongodb.list
sudo apt-get update
sudo apt-get install mongodb-10gen
Clinton Bosch
  • 2,497
  • 4
  • 32
  • 46