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 ?

share|improve this question

10 Answers 10

up vote 265 down vote accepted

On Debian/Ubuntu, it's in the php5-dev package.

sudo apt-get install php5-dev

For PHP7 (from rahilwazir comment):

sudo apt-get install php7.0-dev
share|improve this answer
9  
if using yum instead of apt-get, the appropriate package is called php-devel – cheepychappy Sep 20 '13 at 5:01
4  
yum install php-devel on rhel/centos – andrej Nov 21 '13 at 11:23
3  
How can this be the solution? In the question he said, he already installed php5-dev. – DanFromGermany Sep 24 '15 at 9:11
44  
For PHP7, you can use php7.0-dev – Rahil Wazir Jan 4 '16 at 11:43
12  
For PHP7.1, use php7.1-dev – Nino Škopac Dec 17 '16 at 0:19

For PHP7 Users

sudo apt-get install php7.0-dev
share|improve this answer
4  
you don't really need to type apt-get anymore. apt install is the same. apt-cache no longer needs to be typed anymore either just apt search – Kevin Remisoski Sep 13 '16 at 22:06
    
php7.0-dev is not found in the package list for me. Weird, I see php5-dev in the list, but no php7.0 packages at all. – Solomon Closson Aug 20 '17 at 2:08
    
@SolomonClosson It depends on the OS version you use. – M_R_K Aug 20 '17 at 3:26

Ohk.. I got it running by typing /usr/bin/phpize instead of only phpize.

share|improve this answer
6  
In which case /usr/bin is not in your PATH, but I'm guessing it should be. Do PATH=$PATH\:/usr/bin; export PATH, and phpize will work in the future. – Berry Langerak Jan 13 '12 at 9:36
    
I got this error message "ffmpeg shared libraries not found. Make sure ffmpeg is compiled as shared libraries using the --enable-shared option" I am using this command "phpize" it is working but whene I am running this "./configure && make" this error comes – Chintan Gor Aug 27 '14 at 6:28

Under Redhat Enterprise / CentOS, use yum to install the php-devel module:

yum install php-devel
share|improve this answer
    
This results in No package php-devel available for me. – Phantom Watson Sep 14 '17 at 20:45

Hmm... actually i dont know how this solved it? But the following steps solved it for me:

find / -name 'config.m4'

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.

share|improve this answer

In Ubuntu 16.04, you can install phpize with the command

aptitude install php7.1-dev // for php 7.1

which is equivalent to

apt-get install php7.1-dev // for php 7.1
share|improve this answer

For ubuntu 14.04LTS with php 7, issue:

sudo apt-get install php-dev

Then install:

pecl install memcache
share|improve this answer
    
please wrap your code bits with backticks so that it is displayed as code – YakovL Sep 6 '16 at 12:52
    
Actually, using just php-dev will install the version currently released and maintained for your distro. So on Ubuntu 12 it will install php5-dev. – MacroMan Dec 22 '17 at 11:47

Install from linux terminal

sudo apt-get install <php_version>-dev

Example :

sudo apt-get install php5-dev     #For `php` version 5
sudo apt-get install php7.0-dev   #For `php` version 7.0
share|improve this answer

This might help someone on ubuntu. No promises.

sudo apt-get install libcurl3 php5-dev libcurl4-gnutls-dev libmagic-dev
sudo apt-get install php-http make
sudo pecl install pecl_http

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:

sudo su --
cd /var/log/apache2
tail -25 error.log

Is http.so starting or failing?

share|improve this answer

For ubuntu with plesk installed run apt-get install plesk-php56-dev ,for other versions just change XX in phpXX (without dot)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.