lnmp加入mongodb支持(pecl no found,php-config not found)

来源:互联网 发布:qq群如何推广淘宝客 编辑:程序博客网 时间:2024/06/18 08:27
主命令:
pecl install mongo

pecl command not found 问题解决方法:
yum install php-devel php-pear httpd-devel

configure: error: Cannot find php-config. Please use --with-php-config=PATH
很恶劣的一个问题,
我 find / -name php-config -print,发现在/usr/local/php/bin/php-config,
于是我运行 pecl install mongo  --with-php-config=/usr/local/php/bin,问题依旧
我再运行 pecl install mongo  --with-php-config=/usr/local/php/bin/php-config,问题依旧
我蛋疼地 cp /usr/bin /usr/local/php/bin/php-config,然后再运行,成功了。。。

刚找到一个更好的方法,没亲测,但觉得可行:
cd/tmp/download
wget http://pecl.php.net/get/mongo-1.2.3.tgz
 
tarxzvf mongo-1.2.3.tgz
cdmongo-1.2.3
 
/usr/local/php/bin/phpize
./configure--with-php-config=/usr/local/php/bin/php-config
makeinstall
原创粉丝点击