Search code examples
ccentospearpecl

PECL install fails


I have browsed every Google result, read all the forum posts about this error, but I cannot solve it.

When using PECL install for anything, I always end up getting this error:

checking whether the C compiler works... configure: error: cannot run C compiled programs.

Everything else succeeds up to that point them bam!

I'm using CentOS 4.3, PEAR is the latest stable version, GCC is a stable and recent version. Everything is working as it should, but the C compiler always seems to error. I've tried to make tmp have the right privilages for the operation by temporarily enabling it using:

mount -o remount,exec,suid /tmp

But that doesn't work.

I've literally tried everything that has been suggested by to no avail. Any ideas?


Solution

  • cd ~
    mkdir setups
    cd setups
    wget http://pecl.php.net/get/APC-3.1.2.tgz
    tar -xvf APC-3.1.2.tgz
    cd APC-3.1.2
    phpize && ./configure --with-apxs && make
    

    I quickly wrote that up and was able to install APC with a bit of manual work. Such as copying the module to PHP modules and adding the extension to the php.ini. Works perfectly now.