I have been meaning to install ffmpeg as an extension to my php setup. So before I can install it, I need to phpize
it. I installed php5-dev by sudo apt-get install php5-dev
But now when I run phpize I get the following error :
phpize
Cannot find config.m4.
Make sure that you run '/usr/bin/phpize' in the top level source directory of the module
The location of my php.ini is /usr/local/zend/etc/php.ini
From another online resource i tried this
sudo apt-get install autoconf automake libtool m4
But all of them are already installed.
Locate config.m4 didnt return anything.
Any pointers here how I can get phpize and thus, ffmpeg up and running ?
On Debian/Ubuntu, it's in the php5-dev package.
For PHP 7.x (from rahilwazir comment):
This might help someone on ubuntu. No promises.
And adding
"extension=http.so"
to php.ini (Normally located at/etc/php5/apache2/php.ini
)Then restart Apache (
sudo service apache2 restart
).If in doubt, check your apache logs:
Is http.so starting or failing?
Hmm... actually i dont know how this solved it? But the following steps solved it for me:
Now look if the config.m4 is anywhere in a folder of that stuff you want to phpize. Go to that folder and run phpize directly in there.
Example :
I had this exact problem on macOS in 2018.
For me, first running
brew install php
beforesudo pecl install mongodb
did the trick.In Ubuntu 16.04, you can install
phpize
with the commandwhich is equivalent to