Home arrow Debugging Tips arrow Cannot find autoconf. Please check your autoconf installation and the $PHP_AUTOCONF environment
Cannot find autoconf. Please check your autoconf installation and the $PHP_AUTOCONF environment PDF
Monday, 27 February 2012
If you get the following error when trying to install a php module:

make install clean
===>   php5-exif-5.3.3_1 depends on file: /usr/local/bin/phpize - found
===>   php5-exif-5.3.3_1 depends on file: /usr/local/bin/autoconf-2.62 - found
===>  PHPizing for php5-exif-5.3.3_1
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 code 1

Stop in /usr/ports/graphics/php5-exif


To solve this problem and succesfully compile and install php module do the following:

Install autoconf (if is not installed, which is usualy is):

  pkg_info -Ix autoconf
autoconf-2.62       Automatically configure source code on many Un*x platforms
autoconf-wrapper-20071109 Wrapper script for GNU autoconf

It is not installed:

  whereis autoconf
  cd /usr/ports/devel/autoconf262/
  make install clean


Then find where autoconf is installed

  whereis autoconf
autoconf: /usr/local/bin/autoconf

and then set environment PHP_AUTOCONF variable:

  setenv PHP_AUTOCONF /usr/local/bin/autoconf

Then repeat this process for autoheader:

  whereis autoheader
autoheader: /usr/local/bin/autoheader


  setenv PHP_AUTOHEADER /usr/local/bin/autoheader

That's it. Now try to install your php module (in our example the module is php5-exif):

  cd /usr/ports/graphics/php5-exif
  make install clean


Note: we are using FreeBSD's default shell for root user, which is csh, that's why we used setenv command. If you are using bash you will set your environment variables with export command.

Last Updated ( Monday, 27 February 2012 )
 
< Prev   Next >

Other BSD Systems

OpenBSD

Misc

Solaris

Polls

Best BSD firewall?