apxs:Error: /usr/bin/apr-config not found!
- April 2nd, 2008
- By jrod
- Write comment
When installing apc on a fresh rhel4 x86_64 kick, autoconfig failed with the following:
[161472-app1 18:22:17]-(/var/lib/mysql)# pecl install apc downloading APC-3.0.18.tgz ... Starting to download APC-3.0.18.tgz (115,957 bytes) .........................done: 115,957 bytes 47 source files, building running: phpize Configuring for: PHP Api Version: 20041225 Zend Module Api No: 20060613 Zend Extension Api No: 220060519 1. Use apxs to set compile flags (if using APC with Apache)? : yes
1-1, 'all', 'abort', or Enter to continue: all Use apxs to set compile flags (if using APC with Apache)? [yes] : 1. Use apxs to set compile flags (if using APC with Apache)? : yes
1-1, 'all', 'abort', or Enter to continue: building in /var/tmp/pear-build-root/APC-3.0.18 running: /tmp/pear/temp/APC/configure --with-apxs checking for egrep... grep -E checking for a sed that does not truncate output... /bin/sed checking for gcc... gcc 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 gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking whether gcc and cc understand -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... x86_64-redhat-linux-gnu checking host system type... x86_64-redhat-linux-gnu checking target system type... x86_64-redhat-linux-gnu checking for PHP prefix... /usr checking for PHP includes... -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib checking for PHP extension directory... /usr/lib64/php/modules checking for PHP installed headers prefix... /usr/include/php checking for re2c... no configure: WARNING: You will need re2c 0.12.0 or later if you want to regenerate PHP parsers. checking for gawk... gawk checking whether apc needs to get compiler flags from apxs...
Sorry, I was not able to successfully run APXS. Possible reasons:
1. Perl is not installed; 2. Apache was not compiled with DSO support (--enable-module=so); 3. 'apxs' is not in your path. Try to use --with-apxs=/path/to/apxs The output of /usr/sbin/apxs follows Can't exec "/usr/bin/apr-config": No such file or directory at /usr/sbin/apxs line 48. Use of uninitialized value in scalar chomp at /usr/sbin/apxs line 53. apxs:Error: /usr/bin/apr-config not found!. -O2 -g -pipe -m64 configure: error: Aborting ERROR: `/tmp/pear/temp/APC/configure --with-apxs' failed
Solution:
# up2date apr-devel
# up2date apr-util-devel