删除：libperl5.22 lxc-common perl-modules-5.22 php-imagick php7.1-curl php7.2-curl python3-certbot-nginx
# apt install php7.2-curl -y Reading package lists... Done Building dependency tree Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation: The following packages have unmet dependencies: php7.2-curl : Depends: php7.2-common (= 7.2.3-1ubuntu1) but 7.2.4-1+ubuntu16.04.1+deb.sury.org+1 is to be installed E: Unable to correct problems, you have held broken packages.
You don't need to add a new repo. Just do this and the 7.2 version will be installed. Remember to restart php and apache after. Also make sure (you've prob already done this though) to enable the new mod after:
sudo apt install php-curl sudo a2enmod php7.2
You'll also notice probably that at the end of the install of
php-curl (which installs
php7.2-curl) the following (Note that I have FPM setup, might look different if you're not using FPM):
NOTICE: Not enabling PHP 7.2 FPM by default. NOTICE: To enable PHP 7.2 FPM in Apache2 do: NOTICE: a2enmod proxy_fcgi setenvif NOTICE: a2enconf php7.2-fpm NOTICE: You are seeing this message because you have apache2 package installed.
So do what it says:
sudo a2enmod proxy_fcgi setenvif sudo a2enconf php7.2-fpm sudo systemctl restart apache2.service