Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to install the php extension OAuth in my centos 6 linux server. suggests it's super easy. You just run

pecl install oauth

I tried this, and here is the output in terminal:

[root@www extensions]# pecl install oauth 
WARNING: channel "" has updated its protocols, use "pecl channel-update" 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
share|improve this question

There's an error:

configure: error: Cannot find php-config.

and on the same line, instructions on how to fix it:

Please use --with-php-config=PATH

Obviously, PATH needs to be replaced with the actual path to your php-config.

If you don't have php-config installed, you will have to install that first.

share|improve this answer
Hi, thanks for you answer! my php-config in /usr/local/php/bin/php-config. But I do not know how to use --with-php-config=/usr/local/php/bin/php-config, where should I input --with-php-config=/usr/local/php/bin/php-config? which command should I use? – boo Aug 1 '12 at 8:26
+1. If PHP is self-compiled and installed in a "non standard" directory then --with-php-config must be set to that directory. If PHP is installed from the RPM-package, it just means that the development-package of PHP is not installed - on Centos 6 it's called php-devel – vstm Aug 1 '12 at 8:30
Thanks that did it. But my site cannot open after install oauth:( – boo Aug 1 '12 at 8:45

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.