我试图在Snow Leopard中安装PHP OAuth扩展,我使用捆绑的Apache Web服务器和苹果公司的PHP 5.3.2,它工作得很好。
当我inputterminal时:
sudo pecl install oauth
oauth-1.0.0.tgz下载的很好,但后来我得到这个错误:
WARNING: channel "pecl.php.net" has updated its protocols, use "pecl channel-update pecl.php.net" to update downloading oauth-1.0.0.tgz ... Starting to download oauth-1.0.0.tgz (42,834 bytes) ............done: 42,834 bytes 6 source files, building running: phpize grep: /usr/include/php/main/php.h: No such file or directory grep: /usr/include/php/Zend/zend_modules.h: No such file or directory grep: /usr/include/php/Zend/zend_extensions.h: No such file or directory Configuring for: PHP Api Version: Zend Module Api No: Zend Extension Api No: Cannot find autoconf. Please check your autoconf installation and the $PHP_AUTOCONF environment variable. Then, rerun this script. ERROR: `phpize' failed
我真的不知道这个手段或如何解决它,请帮助!
提醒自己:
source-dir./etc/ /pcre/ dir。 in: /usr/include/php/ext/ /usr/include/php/ext/pcrelib/中的/usr/include/php/ext/pcrelib/到: /usr/include/php/ext/ sudo pecl install oauth extension=oauth.so添加到php.ini 您也可以使用Homebrew安装PHP与梨:
brew install php70 --with-pear [--with-apache]
然后安装oauth:
sudo pecl install oauth
它会自动将extension=oauth.so添加到php.ini 。
这个问题可以通过安装更新版本的pcre来解决 。