I just wasted fair amount of time configuring memcached on my mac development machine. It should have been easy, but it was not. So I’m going to document my steps which led me to a working configuration. Some of these steps might be unnecessary.

Brew makes allot of things easy. So if you don’t have it yet. Please install:

Than check if there are some issues with doctor tool:

If there are errors fix them before proceeding.

I also installed xcode command line tools, go to xcode options -> open developer tools -> more developer tools. You will need to register and download command line tools for your version of OSX.

Screen Shot 2014-02-25 at 23.22.12

Lets start installing required libraries with brew:

I think memcached was automatically installed by xcode command line tools. Run:

If it complains that there are parallel versions of memcached. Just do:

This will ensure that brew installed packages will be used before xcode installed ones.

Lets proceed with php extension:

Now edit this file, if you don’t edit this files make will fail with fatal error.

And at the very end add:

Lets proceed with configuration and installation:

You will see some warnings but ignore it.

Lets enable this extension by editing php.ini:

Add this line:

Restart apache:

Now you can check if memcached extension was successfully installed by visiting info.php page

You should see:

Screen Shot 2014-02-25 at 23.29.40

Leave a Reply

Your email address will not be published. Required fields are marked *