我试图安装php扩展OAuth在我的centos 6 linux服务器。 php.net表明这很容易。 你只是跑步
pecl install oauth
我试过了,这里是terminal的输出:
[root@www extensions]# pecl install oauth WARNING: channel "pecl.php.net" has updated its protocols, use "pecl channel-update pecl.php.net" to update downloading oauth-1.2.2.tgz ... Starting to download oauth-1.2.2.tgz (45,348 bytes) .............done: 45,348 bytes 6 source files, building running: phpize Configuring for: PHP Api Version: 20100412 Zend Module Api No: 20100525 Zend Extension Api No: 220100525 building in /var/tmp/pear-build-rootlyYnpP/oauth-1.2.2 running: /var/tmp/oauth/configure checking for grep that handles long lines and -e... /bin/grep checking for egrep... /bin/grep -E checking for a sed that does not truncate output... /bin/sed checking for cc... cc checking for C compiler default output file name... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether cc accepts -g... yes checking for cc option to accept ISO C89... none needed checking how to run the C preprocessor... cc -E checking for icc... no checking for suncc... no checking whether cc understands -c and -o together... yes checking for system library directory... lib checking if compiler supports -R... no checking if compiler supports -Wl,-rpath,... yes checking build system type... i686-pc-linux-gnu checking host system type... i686-pc-linux-gnu checking target system type... i686-pc-linux-gnu configure: error: Cannot find php-config. Please use --with-php-config=PATH ERROR: `/var/tmp/oauth/configure' failed
有一个错误:
configure: error: Cannot find php-config.
并在同一行上说明如何解决这个问题:
Please use --with-php-config=PATH
显然, PATH需要被replace为你的php-config的实际path。
如果你没有安装php-config ,你必须先安装。