Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

$PHP_AUTOCONF errors on mac os x 10.7.3 when trying to install pecl extensions

I am trying to setup my machine with pecl_http and memcache and in both cases, I get similar errors. This is on MAC OS X 10.7.3 (lion) and I also have XCODE installed on it. I also installed Zend Server community edition before running these commands and have CFLAGS='-arch i386 -arch x86_64' environment variables set. So please help with what I need to do

bash-3.2# **sudo pecl install pecl_http-1.7.1**
downloading pecl_http-1.7.1.tgz ...
Starting to download pecl_http-1.7.1.tgz (174,098 bytes)
.....................................done: 174,098 bytes
71 source files, building
running: phpize
Configuring for:
PHP Api Version:         20090626
Zend Module Api No:      20090626
Zend Extension Api No:   220090626
Cannot find autoconf. Please check your autoconf installation and the
$PHP_AUTOCONF environment variable. Then, rerun this script.
ERROR: `phpize' failed
like image 937
krishna Avatar asked Feb 17 '12 04:02

krishna


4 Answers

brew install autoconf

Much easier solution

like image 54
Bob Spryn Avatar answered Nov 12 '22 19:11

Bob Spryn


You need to install autoconfig. I usually like to install libraries from source. So you can do the following:

curl -OL http://ftpmirror.gnu.org/autoconf/autoconf-latest.tar.gz
tar xzf autoconf-latest.tar.gz
cd autoconf-*
./configure --prefix=/usr/local
make
sudo make install

I just went through this with Mountain Lion.

like image 93
Ares Avatar answered Nov 12 '22 20:11

Ares


On Mac OS X 10.8 situation is slightly different. Highly voted solution from Bob Spryn doesn't work, because it doesn't create symlinks, so after installing autoconf you should make them:

sudo ln -s /usr/local/Cellar/autoconf/2.69/bin/autoconf /usr/bin/autoconf
sudo ln -s /usr/local/Cellar/autoconf/2.69/bin/autoheader /usr/bin/autoheader

I know that this question was for 10.7, but I hope my answer is useful for someone on 10.8. :)

Updated: Also works on 10.10 Yosemite.

like image 55
Anton Babenko Avatar answered Nov 12 '22 21:11

Anton Babenko


or

sudo port install autoconf

if you use macports

like image 15
stoefln Avatar answered Nov 12 '22 21:11

stoefln