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:
sudo apt install php-dev
For older versions of Debian/Ubuntu:
For PHP 5, install php5-dev:
sudo apt-get install php5-dev
For PHP 7.x, install php7.x-dev (replace x with the PHP version):
sudo apt-get install php7.x-dev
RHEL/CentOS:
Install the php-devel package:
yum install php-devel
Additional Notes:
If you still encounter the error after installing the development packages, try the following command to locate config.m4:
find / -type f -name config.m4
Once the development packages are installed, you should be able to run phpize and proceed with the extension installation.
Disclaimer: All resources provided are partly from the Internet. If there is any infringement of your copyright or other rights and interests, please explain the detailed reasons and provide proof of copyright or rights and interests and then send it to the email: [email protected] We will handle it for you as soon as possible.
Copyright© 2022 湘ICP备2022001581号-3