Cannot find autoconf. Please check your autoconf installation

chris (2008-07-22 01:11:11)
20897 views
4 replies
If this error occurs when you are trying to install a PHP Pecl extension, the chances are you don't have autoconf installed on your system:

root@brezhnev:/usr/src/php-5.2.6# pecl install pdo
WARNING: channel "pecl.php.net" has updated its protocols, use "channel-update pecl.php.net" to update
downloading PDO-1.0.3.tgz ...
Starting to download PDO-1.0.3.tgz (52,613 bytes)
.............done: 52,613 bytes
12 source files, building
running: phpize
Configuring for:
PHP Api Version:         20041225
Zend Module Api No:      20060613
Zend Extension Api No:   220060519
Cannot find autoconf. Please check your autoconf installation and the $PHP_AUTOCONF environment variable is set correctly and then rerun this script.

I won't assume any particular distro here - instead here's where you can go to get the autoconf and m4 sources. Follow these steps to download and install them. Your extension installations should work just fine thereafter:

# cd /usr/src
# wget http://ftp.gnu.org/gnu/m4/m4-1.4.9.tar.gz
# tar -zvxf m4-1.4.9.tar.gz
# cd m4-1.4.9/
# ./configure && make && make install
# cd ../
# wget http://ftp.gnu.org/gnu/autoconf/autoconf-2.62.tar.gz
# tar -zvxf autoconf-2.62.tar.gz
# cd autoconf-2.62/
# ./configure && make && make install

christo
comment
Elias
2009-04-29 15:19:33

Great post

Thank you, that's what I needed : )
reply iconedit reply
uhaish
2009-10-01 10:26:43

for debian

If you are on debian type distro for eg. ubuntu

then simply do
sudo apt-get install m4;
sudo apt-get install autoconf;
reply iconedit reply
Alexc
2009-12-05 11:17:07

If you are on debian type distro for eg. ubuntu

then simply do
sudo apt-get install m4;
sudo apt-get install autoconf;


Or just
sudo apt-get install autoconf;
because m4 is a dependency to autoconf.
reply iconedit reply
Lucid
2010-01-29 06:31:24

autoconf on mac (Leopard 10.5)

if you are on a mac download and install a copy of the xcode developer tools.
reply iconedit reply