Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

phpize reports "Cannot find config.m4"

I am trying to run the 'phpize' command on MacOSx Mountain Lion, but this is what I get:

 Cannot find config.m4.   Make sure that you run '/opt/local/bin/phpize' in the top level source directory of the module 

How do I resolve this error ?

like image 575
Ankit Rustagi Avatar asked Jul 24 '13 12:07

Ankit Rustagi


2 Answers

The phpize command is meant to be run at the top level of an extension source dir (this source dir should contain a file name config.m4).

See http://php.net/manual/en/install.pecl.phpize.php for more information.

like image 60
nstCactus Avatar answered Oct 02 '22 10:10

nstCactus


In plain English, it means you're running the command from the wrong directory. You need to be in the directory that contains the source for the extension you're trying to install.

For example, if you're trying to install mcrypt, like I was when I came across this stack overflow page, you need to be in php-5.6.24/ext/mcrypt and then run the command.

like image 44
Erin Geyer Avatar answered Oct 02 '22 10:10

Erin Geyer