Problems installing APC - cannot run C compiled programs

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
optrex
Forum Newbie
Posts: 1
Joined: Mon Nov 22, 2010 1:43 pm

Problems installing APC - cannot run C compiled programs

Post by optrex »

Hello,

I have a new VPS running php 5.2.14 on Centos 5 64bit and I am trying to install APC. I've followed the instructions in terms of
yum install php-pear
yum install php-devel
yum install httpd-devel
pecl install apc
but I get the error
[root@vps374 ~]# pecl install apc
downloading APC-3.0.19.tgz ...
Starting to download APC-3.0.19.tgz (115,735 bytes)
.........................done: 115,735 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:
building in /var/tmp/pear-build-root/APC-3.0.19
running: /root/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 cc... cc
checking for C compiler default output file name... a.out
checking whether the C compiler works... configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details.
ERROR: `/root/tmp/pear/temp/APC/configure --with-apxs' failed
[root@vps374 ~]#
As part of the process I've changed the pear download directory, cache directory and temp directory due to noexec on /tmp and /var/tmp and the combined inability to elevate to exec on those folders. I've also exported $PHP_AUTOHEADER and $PHP_AUTOCONF to get this far.

My gcc libraries are installed but I don't know how to check the configuration
gcc 4.1.2-48.el5 x86_64 Various compilers (C, C++, Objective-C, Java, ...)
gcc-c++ 4.1.2-48.el5 x86_64 C++ support for GCC
libgcc 4.1.2-48.el5 x86_64 GCC version 4.1 shared support library
libgcc 4.1.2-48.el5 i386 GCC version 4.1 shared support library
Post Reply