Last active

Embed URL


SSH clone URL

You can clone with HTTPS or SSH.

Download Gist

Install PHP APC on Mac OS X 10.8 "Mountain Lion"

View gist:4074061
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
# Compile PCRE - Perl Compatible Regular Expressions
cd /usr/local/src
curl -O
tar -xvzf pcre-8.31.tar.gz
cd pcre-8.31
sudo make install
# Compile Autoconf
cd /usr/local/src
curl -O
tar xzf autoconf-2.69.tar.gz
cd autoconf-2.69
./configure --prefix=/usr/local
sudo make install
# Compile PHP APC
cd /usr/local/src
curl -O
tar xzf APC-3.1.13.tgz
cd APC-3.1.13
./configure --with-php-config=/usr/bin/php-config
make && sudo cp modules/*.so /usr/lib/php/extensions/no-debug-non-zts-20090626

How come there is no "make install" after you "configure" and "make" PHP APC?

because they are line 26...

BognarB commented

use APC-3.1.9 is last stable version at this moment

@BognarB is indeed correct, 3.1.9 is the latest stable version: Thanks for the Gist, it worked a treat.

Works on 10.9 Mavericks (with Xcode 5) too.

pcre needs to be 8.33

I had to use the following to get APC installed on my system:

[path_to_php]/bin/phpize && CFLAGS=-m32 CPPFLAGS=-m32 CCASFLAGS=-m32 ./configure --with-php-config=[path_to_php]/bin/php-config && make

/usr/include/php/ext/pcre/php_pcre.h:29:10: fatal error: 'pcre.h' file not found

Latest PCRE is 8.35. Change lines 3-5 to read:

curl -O
tar -xvzf pcre-8.35.tar.gz
cd pcre-8.35

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.