DEV Community

Adamo Crespi for Serendipity HQ

Posted on • Originally published at io.serendipityhq.com on

How to set the $PHP_AUTOCONF environment variable in MAMP (in 2 steps)

If you receive this error trying to install some new binaries using MAMP (for example, installing Intl PHP module), then there is a chance you’ll get this error in your Terminal:

Cannot find autoconf. Please check your autoconf installation and the $PHP_AUTOCONF environment variable. Then, rerun this script.

This happens because you haven’t the Autoconf binaries installed.

So, let’s install the Autoconf binaries in MAMP.

STEP 0: Verify which version of PHP you are currently running

Before you install Autoconf binaries, check that your Terminal is using the PHP binaries provided by MAMP.

Instead you have to install Autoconf both for the PHP used by Terminal – the one shipped with MacOSX – and for the PHP used by your browsers – the one shipped with MAMP. Yes, they are 2 separate binaries packages!

STEP 1: Download autoconf binaries and uncompress them

$ cd ~/Desktop
$ curl -O http://mirror2.mirror.garr.it/mirrors/gnuftp/gnu/autoconf/autoconf-latest.tar.gz
$ tar xzvf autoconf-latest.tar.gz
Enter fullscreen mode Exit fullscreen mode

STEP 2: Compile the binaries and install them

Now that you have the Autoconf binaries, you have to install them. So, move into the auoconf-* folder and compile and install the binaries:

$ cd autoconf-*
$ ./configure
$ make && sudo make install
Enter fullscreen mode Exit fullscreen mode

This process may require some minutes and during the process you will be asked to provide the Admin password.

To verify your work, type:

$ which autoconf
/usr/local/bin/autoconf
Enter fullscreen mode Exit fullscreen mode

Remember to “Make. Ideas. Happen.”.

I wish you flocking users, see you soon!

L'articolo How to set the $PHP_AUTOCONF environment variable in MAMP (in 2 steps) proviene da ÐΞV Experiences by Serendipity HQ.

Top comments (0)