Home > Article > Backend Development > Why Can\'t I Install ffmpeg as a PHP Extension? (The \'Cannot find config.m4\' Error)
Installation and Configuration Issues
When attempting to install ffmpeg as a PHP extension, you may encounter the error "Cannot find config.m4." This error indicates that phpize cannot locate the necessary headers within your PHP setup. Here's a closer examination of the situation and how to resolve it.
Missing Dependency
The absence of config.m4 suggests that you have not correctly installed the necessary PHP development package. Typically, you would need to install php5-dev in your case, as indicated by your sudo apt-get install php5-dev command.
Solving the Dependency
Depending on your Linux distribution, you may need to install a different package:
Once you have installed the appropriate dependency, retry running phpize. This should install the required headers and resolve the missing config.m4 issue.
The above is the detailed content of Why Can\'t I Install ffmpeg as a PHP Extension? (The \'Cannot find config.m4\' Error). For more information, please follow other related articles on the PHP Chinese website!