0

I already searched answer for this question and checked Bartek Chanda answer, but not working with me. I have debian 9.13 and already done what Bartek Chanda answered, but not working.

Still got this error:

php7.4-curl : Depends: php7.4-common (= 7.4.18-2+ubuntu21.04.1+deb.sury.org+3) but 7.4.12-3+0~20201103.32+debian9~1.gbpa97e22 is to be installed

Depends: libcurl4 (>= 7.56.1) but it is not installable
E: Unable to correct problems, you have held broken packages.
  • Hi, have you googled for "*E: Unable to correct problems, you have held broken packages.*"? There are possible solutions like https://askubuntu.com/a/363244/223999 – Daniel F Jun 02 '21 at 13:23
  • Check out this one instead: https://computingforgeeks.com/how-to-install-latest-php-on-debian/ – Orphans Jun 02 '21 at 13:35

2 Answers2

0

You say you have Debian 9 but you appear to have added an apt source intended for Ubuntu 21.04. Remove it and replace it with the correct apt source, then try again.

Michael Hampton
  • 237,123
  • 42
  • 477
  • 940
0

try:

sudo apt update
sudo apt upgrade -y && sudo reboot
sudo apt -y install lsb-release apt-transport-https ca-certificates 
sudo wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg
echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/php.list
sudo apt update
sudo apt -y install php7.4

For detailed information you can refer the link

Nimal V
  • 17
  • 3