Troubleshooting "Cannot Find config.m4" Error in phpize
Encountering the "Cannot find config.m4" error while running phpize is a common issue that can hinder the installation of extensions like ffmpeg. Here's how to resolve this error and get phpize up and running.
Prerequisites:
You have already installed the necessary development packages for your PHP version, such as php-dev for Debian/Ubuntu or php-devel for RHEL/CentOS.
Solution:
Debian/Ubuntu:
For Debian 9 or Ubuntu 16.04 , install the php-dev dependency package:
<code class="shell">sudo apt install php-dev</code>
For older versions of Debian/Ubuntu:
For PHP 5, install php5-dev:
<code class="shell">sudo apt-get install php5-dev</code>
For PHP 7.x, install php7.x-dev (replace x with the PHP version):
<code class="shell">sudo apt-get install php7.x-dev</code>
RHEL/CentOS:
Install the php-devel package:
<code class="shell">yum install php-devel</code>
Additional Notes:
If you still encounter the error after installing the development packages, try the following command to locate config.m4:
<code class="shell">find / -type f -name config.m4</code>
Once the development packages are installed, you should be able to run phpize and proceed with the extension installation.
The above is the detailed content of Why Am I Getting the \'Cannot Find config.m4\' Error When Running phpize?. For more information, please follow other related articles on the PHP Chinese website!