Support > General Support

Having fits trying to install APC

(1/1)

Oldiesmann:
Some time ago, I installed APC on my server. However, when I recently upgraded to PHP 5.3.1, I lost this module, and now I can't get it installed anymore, no matter what option I try.

If I do pecl install apc, I get this error:


--- Code: ---root@oldiesmann [/]# 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:         20090626
Zend Module Api No:      20090626
Zend Extension Api No:   220090626
Use apxs to set compile flags (if using APC with Apache)? [yes] :
building in /var/tmp/pear-build-root/APC-3.0.19
running: /root/tmp/pear/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/APC/configure --with-apxs' failed
--- End code ---

I've read on other sites that this is due to the GCC environment variable not being set to the gcc compiler. If I change this and try again, I get an error about not being able to compile executables.

I tried installing it through the interface in WHM and I still get an error there as well (it gets further but dies in the make process).

For now I'm just giving up and installing eAccelerator, but I would prefer APC as this worked well before.

PHP version is 5.3.1, compiled as CGI/FastCGI.

Oldiesmann:
Finally got it installed through the WHM Pecl module installer - another person said I needed the APC-beta package, which installed fine. Still doesn't explain why I can't do a regular pecl install from the shell though.

Alex:
This can be caused by the tmp mount .

You can try a #mount | grep /tmp and if it shows /tmp on /var/tmp type none (rw,noexec,nosuid,bind)  (which most likely it will) then you are trying to execute scripts to compile at a non-executable mount point .

Why the install from Cpanel worked is because it compiles the packages outside tmp. You should be able to run it from shell if you download it manually and compile it in the download location (e.g. /usr/local/src/APC ).

Doug was right (but don't tell him that , I'll never hear the end of it  :p). I don't spend enough time on the forums . Sorry for the late reply on this :rolleyes:

Navigation

[0] Message Index

Go to full version