-1

I am very new to the ubuntu os , when i tried to install php7.2-curl extension(sudo apt-get install php7.2-curl)it throws following error

The following packages have unmet dependencies:
 php7.2-curl : Depends: php7.2-common (= 7.2.34-23+ubuntu21.04.1+deb.sury.org+1) but 7.2.34-24+0~20210826.64+debian9~1.gbp428dfa is to be installed
E: Unable to correct problems, you have held broken packages.

i find some solution to fix this issue (sudo apt-get install libcurl13 php7.2-curl) when i run this command it shows following error ,How to resolve the issue ,Help me to fix this issue

Package libcurl3 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
  libcurl4:i386 libcurl4

E: Package 'libcurl3' has no installation candidate

  • 1
  • "you have held broken packages" - package management must be in order before installing new software. sudo apt update should be executed before any other apt commands so that you are dealing with the current list of available software and generally updates need to be completed with sudo apt upgrade before installing anything new. – Nmath Sep 15 '21 at 06:40
  • @pLumo, that's not related to my question – Code cracker Sep 15 '21 at 06:44
  • Your sources are clearly broken because you added some non-standard repositories. If it is a ppa or a manually added repo doesn't matter, the duplicate explains it very well how to fix it. – pLumo Sep 15 '21 at 06:48
  • Also asked here, with more information given ... – pLumo Sep 15 '21 at 06:53
  • You have conflicting repositories. You have to remove the https://packages.sury.org/php stretch/main amd64 Packages repository and all packages that came with it. If you really need 7.2 (instead of 7.4 that is provided by Ubuntu) you can use ondreys ppa (that you already do) , otherwise I would suggest to remove that ppa with ppa-purge and install 7.4. All this information is in the duplicate, i linked above. – pLumo Sep 15 '21 at 07:03

1 Answers1

4

libcurl3 has been replaced by libcurl4 in Ubuntu 21.04, so if you install libcurl4 Ubuntu will use it instead of libcurl3. Open the terminal and type:

sudo apt update
sudo apt install libcurl4
sudo ln -s /usr/lib/x86_64-linux-gnu/libcurl.so.4.5.0 /usr/lib/x86_64-linux-gnu/libcurl.so.4.7.0
sudo apt install php7.2-curl
karel
  • 114,770