Home > Article > Backend Development > How to solve the problem that Pagoda Panel cannot install php 7.2
Recently, many users have reported that they have encountered some problems when installing the Pagoda Panel, especially when installing PHP 7.2, they will not be able to install it. If you have also encountered this problem, don't worry, let's introduce how to solve the problem that Pagoda PHP 7.2 cannot be installed.
1. Problem description
When installing the Pagoda panel, the latest version of PHP is usually installed. At this time, PHP version 7.4 will be installed by default, but the user wants to use When version 7.2 is released, the version number will be adjusted. At this time, the following two error messages may appear:
Could not resolve host: www.php.net Failed loading /www/server/php/72/lib/php/extensions/no-debug-non-zts-20170718/opcache.so
2. Solution
appears The error message "Could not resolve host: www.php.net" is likely caused by network problems. You can try the following two methods to solve the problem:
(1) Change DNS
Add a new DNS in the /etc/resolv.conf file:
nameserver 8.8.8.8
Save the file Finally, reconnect the pagoda panel for installation.
(2) Modify the hosts file
You can try to modify the hosts file and copy the following code into it:
140.205.201.2 www.php.net 199.232.69.194 github.com
Save the file, restart the DNS service, and then reconnect to the pagoda Just install the panel.
appears "Failed loading /www/server/php/72/lib/php/extensions/no-debug-non-zts-20170718/ opcache.so" error message is usually caused by PHP extension problems. The solution is as follows:
Remove the opcache.so file from the /www/server/php/72/lib/php/extensions/ file Delete it from the folder, and then re-execute the installation command:
wget -O /www/server/php/72/php.ini https://raw.githubusercontent.com/5iux/srs/master/php/72.ini ln -sf /www/server/php/72/bin/php /usr/bin/php /etc/init.d/php-fpm-72 restart
Then reconnect the pagoda panel to install it.
3. Summary
When installing Pagoda PHP 7.2, the installation fails, which is usually caused by network or PHP extension problems. It can be solved by changing the DNS, modifying the hosts file, or deleting the problematic PHP extension file. I hope the above solutions will be helpful to users who encounter the same problem.
The above is the detailed content of How to solve the problem that Pagoda Panel cannot install php 7.2. For more information, please follow other related articles on the PHP Chinese website!