Installing Mcrypt in Mac OS X 10.6.6

I need to have PHPMyAdmin running in my MacbookPro (localhost), so PHPMyAdmin was downloaded and copied into webdocs folder for Mac OS X, however PHPMyAdmin needs Mcrypt to be installed. After searching using Google, I found out that the following procedures can be used to install Mcrypt that needed by PHPMyAdmin in Mac OS X environment. Here are the steps that have been used successfully to install Mcrypt in Mac OS X 10.6.6:

mkdir -p /downloads

cd /downloads

curl -O

tar xzf libmcrypt-2.5.8.tar.gz

cd libmcrypt-2.5.8

MACOSX_DEPLOYMENT_TARGET=10.6 CFLAGS=” -arch x86_64 -g -Os -pipe -no-cpp-precomp” CCFLAGS=” -arch x86_64 -g -Os -pipe” CXXFLAGS=” -arch x86_64 -g -Os -pipe” LDFLAGS=” -arch x86_64 -bind_at_load” ./configure –disable-dependency-tracking

mcrypt install command





make install

—(Now build dynamically loaded extension)—

cd /downloads

curl -O

tar xjf php-5.3.3.tar.bz2

cd /downloads/php-5.3.3/ext/mcrypt


MACOSX_DEPLOYMENT_TARGET=10.6 CFLAGS=” -arch x86_64 -g -Os -pipe -no-cpp-precomp” CCFLAGS=” -arch x86_64 -g -Os -pipe” CXXFLAGS=” -arch x86_64 -g -Os -pipe” LDFLAGS=”-arch x86_64 -bind_at_load” ./configure


make install

When done, edit/create /etc/php.ini and add:

Next, need to restart Apache:
sudo apachectl restart

Note: you need Apple Xcode installed and compilation is only for X86,  see “-arch x86_64″config.



4 thoughts on “Installing Mcrypt in Mac OS X 10.6.6

  1. I tried this. After MACOSX_DEPLOYMENT_TARGET … etc I got this :

    configure: WARNING: you should use –build, –host, –target
    configure: WARNING: invalid host type: –disable-dependency-tracking
    checking build system type… Invalid configuration `–disable-dependency-tracking’: machine `–disable-dependency’ not recognized
    configure: error: /bin/sh ./config.sub –disable-dependency-tracking failed

  2. It should be … /configure –disable-dependency-tracking (with two dashes in front of the word disable). The current font-setting does not correctly shown those dashes in the post, instead they are joined and become a single dash. I’ve added a picture version of that command line that shows the use of those double dashes.

  3. But now I get this after make install :

    Making install in modules
    Making install in algorithms
    test -z “/usr/local/lib/libmcrypt” || /bin/sh ../../mkinstalldirs “/usr/local/lib/libmcrypt”
    mkdir /usr/local/lib
    mkdir: /usr/local/lib: Permission denied
    mkdir /usr/local/lib/libmcrypt
    mkdir: /usr/local/lib: No such file or directory
    make[3]: *** [install-pkglibLTLIBRARIES] Error 1
    make[2]: *** [install-am] Error 2
    make[1]: *** [install-recursive] Error 1
    make: *** [install-recursive] Error 1

    • It is not written explicitly, however, It is imperative to provide a user elevated privilege when using make install by issuing the complete command: sudo make install

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s