Home > Article > Backend Development > What should I do if php does not find config?
Solution to php not finding config: 1. Execute the "yum install php-devel" command; 2. Use wget to download the "libedit-devel" package; 3. Use "rpm -inv libedit-devel-3.1 -23.20170329cvs.el8.x86_64.rpm" decompress; 4. Search for the "php-config" file again.
The operating environment of this tutorial: linux5.9.8 system, PHP version 8.1, Dell G3 computer.
php What should I do if config is not found? php is missing the php-config file?
I originally wanted to configure extensions for php but suddenly found that the php-config file could not be found
1. Use the linux command
yum install php-devel
Some use
yum install php70w-devel (This 70w is your php version number plus a w. For example, if your php version is php7.0, you will be 70w. If yours is 7.2, yours will be 72w)
2. If you use the above command to report an error
For example, if the information shown in the figure is displayed, it means that the package of libedit-devel (x86-64) is missing
1. We Go to the https://centos.pkgs.org/ website to search and match it with what you need
For example
After clicking in we Find the data in the Binary Package in Download and copy it
2. Use wget to download it in your Linux (as shown below)
3. Then use rpm -inv libedit-devel-3.1-23.20170329cvs.el8.x86_64.rpm to decompress the file,
4. If an error occurs during decompression, for example
means that another file ncurser-devel is missing. We download the missing file from the website just mentioned. (dependencies translates to dependencies. All it means is that the decompressed file lacks dependencies. item), then we re-execute steps 1-3 above. Note that the file we decompress must first start with the required dependencies and then slowly move up to the file we downloaded first;
When all required dependencies are installed and decompressed, we will execute yum install php-devel and no error will be reported.
At this time, we will search for the php-config file and we will find it soon;
Recommended study: "PHP Video Tutorial"
The above is the detailed content of What should I do if php does not find config?. For more information, please follow other related articles on the PHP Chinese website!