1

I need to install some extra modules like:

sudo pecl install apc
sudo pecl install memcache

But the pecl program is not installed. Supposedly, I can install it by installing the php-devel package with yum, but yum insists on installing the PHP package too. I've already compiled and installed my own version of PHP from source and don't want/need the packaged version.

How do I get APC and memcache on here?

Configuration options:

./configure --enable-fastcgi --enable-fpm --with-mcrypt --with-zlib --enable-mbstring
--disable-pdo --with-mysqli with-gd --with-json --with-tidy --with-curl --disable-debug
--with-pic --disable-rpath --enable-inline-optimization --with-bz2 --with-xml --with-zlib
--enable-sockets --enable-sysvsem --enable-sysvshm --enable-soap --enable-pcntl
--enable-bregex --with-mhash --enable-xslt --enable-zip --with-pcre-regex --with-pspell

UPDATE:

OK, found the command, but now when I run it I'm getting:

/usr/local/bin/pecl install apc
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 /var/tmp/pear-build-root/APC-3.0.19/n follows
/tmp/pear/temp/APC/configure: line 3431: /var/tmp/pear-build-root/APC-3.0.19/n: No such file or directory
configure: error: Aborting
ERROR: `/tmp/pear/temp/APC/configure --with-apxs=n' failed

Perl is installed. I'm not planning to use Apache since I want to try Engine-X (I choose no to the Apache question). And what is apxs??

Nick
  • 4,433
  • 29
  • 67
  • 95

3 Answers3

1

Your custom-compiled PHP should have installed pecl, and configured it properly.

Have you tried running "pecl install apc"?

If your system is not finding pecl, it's probable that you used some funny --prefix when you ./configure'd PHP.

For instance, if you compiled php like this:

$ ./configure --prefix=/foo
$ make
# make install

then you'll either want to get /foo/bin into $PATH, or you could just run

$ /foo/bin/pecl install apc

EDIT: Now I remember: try pecl install apc-beta. Something is screwy with 5.3.3 and non-beta APC. My experience is apc-beta works fine.

tim
  • 516
  • 2
  • 5
  • Running "pecl install apc" produces a "bash: pecl: command not found" error. I didn't specify a prefix option to configure. Do I have to specify --with-pecl or something when I compile? – Nick Sep 23 '10 at 11:27
  • @Nick - See my edit – tim Sep 23 '10 at 17:46
  • apc-beta works correctly. Marking this as the answer... I just hope that beta is stable enough for production? – Nick Sep 26 '10 at 05:42
  • I'm using it in production without any issues. – tim Sep 26 '10 at 18:16
0

Other way is to compile this extensions from source

ghloogh
  • 1,039
  • 5
  • 9
-1

I had this too - its a really stupid fix

you have to type 'yes' instead of just 'y' when it asks you. Not kidding...

Xav
  • 1