cd mongo-1.4.0 && \
phpize && \
./configure && \cd
make && make install
执行上面命令时报错:
configure: error: Cannot find php-config. Please use --with-php-config=PATH
解决:命令改为:
cd mongo-1.4.0 && \
phpize && \
./configure --with-php-config=/www/server/php/56/bin/php-config && \cd
make && make install
上面这个为/www/server/php/56/bin/php-config PHP的安装路径,完整填写 php-config的路径就好了
报错二:
make: *** No targets specified and no makefile found. Stop.
解决:执行下面命令
apt-get update
apt-get install gcc build-essential