How to install and run phpize
Solution 1
For recent versions of Debian/Ubuntu (Debian 9+ or Ubuntu 16.04+) install the php-dev
dependency package, which will automatically install the correct version of php{x}-dev
for your distribution:
sudo apt install php-dev
Older versions of Debian/Ubuntu:
For PHP 5, it's in the php5-dev package.
sudo apt-get install php5-dev
For PHP 7.x (from rahilwazir comment):
sudo apt-get install php7.x-dev
RHEL/CentOS/yum
yum install php-devel # see comments
Solution 2
For PHP7 Users
7.1
sudo apt install php7.1-dev
7.2
sudo apt install php7.2-dev
7.3
sudo apt install php7.3-dev
7.4
sudo apt install php7.4-dev
If not sure about your PHP version, simply run command php -v
Solution 3
Ohk.. I got it running by typing /usr/bin/phpize
instead of only phpize
.
Solution 4
Under Redhat Enterprise / CentOS, use yum
to install the php-devel
module:
yum install php-devel
For PHP 7, you need:
yum install php70-php-devel
Solution 5
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.
Related videos on Youtube
Comments
-
Hrishikesh Choudhari about 2 years
I have been meaning to install
ffmpeg
as an extension to my PHP setup. So before I can install it, I need tophpize
it. I installedphp5-dev
bysudo apt-get install php5-dev
. But now when I runphpize
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 didn't return anything.
Any pointers here how I can get
phpize
and thus,ffmpeg
up and running? -
Berry Langerak over 12 yearsIn which case /usr/bin is not in your PATH, but I'm guessing it should be. Do
PATH=$PATH\:/usr/bin; export PATH
, andphpize
will work in the future. -
Anand Phadke about 11 yearsI am new to ubuntu... when i type this command it asks me are u root ..how to get permission to root ?
-
Nanne about 11 yearsprepend 'sudo' to the command, to get
sudo apt-get install php5-dev
-
cheepychappy almost 11 yearsif using yum instead of apt-get, the appropriate package is called php-devel
-
andrej over 10 yearsyum install php-devel on rhel/centos
-
Chintan Gor almost 10 yearsI 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
-
mac over 9 yearsAfter installing php5-dev, Also check the directory in which you are running this command. It should contain .m4 file
-
d.raev almost 9 yearsYou may have to run
sudo apt-get update && sudo apt-get upgrade
to update your repositories -
Daniel W. almost 9 yearsHow can this be the solution? In the question he said, he already installed php5-dev.
-
Rahil Wazir over 8 yearsFor PHP7, you can use
php7.0-dev
-
YakovL almost 8 yearsplease wrap your code bits with backticks so that it is displayed as code
-
Kevin Remisoski almost 8 yearsyou 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
-
The Onin over 7 yearsFor PHP7.1, use
php7.1-dev
-
jim smith over 7 yearsFor PHP 5.6 use php5.6-dev
-
Solomon Closson almost 7 yearsphp7.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.
-
M_R_K almost 7 years@SolomonClosson It depends on the OS version you use.
-
Phantom Watson almost 7 yearsThis results in
No package php-devel available
for me. -
MacroMan over 6 yearsActually, using just php-dev will install the version currently released and maintained for your distro. So on Ubuntu 12 it will install php5-dev.
-
Stefan over 6 yearsFor PHP7, I needed to use
php70-php-devel
-
Metagrapher about 6 years
sudo apt-get install php7*-dev
will grab the version installed with your system. Make sure to update the major version (when that changes eventually) -
Josh Whitlow about 6 yearsOn my installation which uses cpanel, I had the php-devel package installed, but needed to use the full path name to execute phpize:
/opt/cpanel/ea-php71/root/usr/bin/phpize
, Reference: cpanel forums -
MacroMan over 5 yearsIf you install package php-dev instead, PHP will always upgrade to the latest stable release. If you install php7.0-dev and PHP 7.1 is released, you generally won't be upgraded to it.
-
josef over 5 years
yum install php72-php-devel
for PHP 7.2 -
josef over 5 yearsand use this
ln -s /opt/remi/php72/root/bin/phpize /usr/bin/phpize
-
eselskas over 5 yearsFor PHP[Y] use php[y]-dev
-
7ochem about 4 yearsCould you update your answer and add the solution for PHP 8? Now that PHP8 alpha 1 is here...
-
Saeesh Tendulkar almost 4 yearsFor PHP7.2, use php7.2-dev
-
be3 over 3 yearsNo match for argument: php74-php-devel
-
Andy Bajka about 3 yearsThis worked for me: /opt/cpanel/ea-php80/root/usr/bin/phpize
-
lycanthrope10100 about 3 yearsOr you could do this
scl enable php70 bash
-
Gwyneth Llewelyn over 2 yearsTwo things on this old answer... 1) You should also include the instructions on how to install
brew
in the first place (get Command Line utilities, go to brew.sh and get it, beware of destroying your Apple-installed PHP, etc.); also note that Linux users can usebrew
, too! 2)pecl
will obviously only install PECL packages, the OP was interested inffmpeg-php
, which is not available via PECL at all...