Unable to install cURL on Ubuntu 20.04 due to dependency issues

I use Ubuntu 20.04.1 and trying to install cURL. When I run sudo apt install curl in the terminal I get an error of:

The following packages have unmet dependencies: curl : Depends: libcurl4 (= 7.68.0-1ubuntu2) but 7.68.0-1ubuntu2.2 is to be installed
E: Unable to correct problems, you have held broken packages.

I have tried to follow this slightly similar solution unsuccessfully.
This is the screenshot of the error as it appears in my computer:

screenshot of my error

Output of apt-cache policy curl libcurl4:

  Installed: (none) 
  Candidate: 7.68.0-1ubuntu2 
  Version table: 
     7.68.0-1ubuntu2 500
     500 us.archive.ubuntu.com/ubuntu focal/main amd64 Packages
  Installed: 7.68.0-1ubuntu2.2
  Candidate: 7.68.0-1ubuntu2.2
  Version table: 
 *** 7.68.0-1ubuntu2.2 100
        100 /var/lib/dpkg/status 
     7.68.0-1ubuntu2 500
        500 us.archive.ubuntu.com/ubuntu focal/main amd64 Packages 
Asked By: Charleskimani


You actually have libcurl4 from focal-updates while APT is trying to install cURL from focal since you don’t have focal-updates updates enabled (anymore?). At this point you have 2 options. Either enable focal-updates repository or install libcurl4 from focal.

  1. To enable focal-updates, run

    echo "deb http://archive.ubuntu.com/ubuntu focal-updates main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list

    Once done, run sudo apt update and retry installing cURL.

  2. To install libcurl4 from focal, simply run

    sudo apt install libcurl4=7.68.0-1ubuntu2

    Retry installing cURL.

The later one might not work if you have packages dependent on installed libcurl4, i.e., version 7.68.0-1ubuntu2.2.

Answered By: Kulfy

Please run this command in terminal

sudo snap install curl  # version 7.84.0  


sudo apt  install curl  # version 7.68.0-1ubuntu2.13
Answered By: monnaleeza