Stuck trying to install libcurl4

15,185

Solution 1

Nvmnd, I figured it out.

It was a mix of arm64 packages messing up my sources. I fixed that using

apt-get purge ".*:<arch>"
dpkg --remove-architecture <arch>

as described here.

This somehow also got rid of all other sources in my sources file so I fixed that using this

Then a sudo apt update and I was set.

Solution 2

You can add it to the repository:

sudoedit /etc/apt/sources.list

Then add this and save:

deb http://security.ubuntu.com/ubuntu bionic-security main

sudo apt-get update
sudo apt-get install libcurl4-openssl-dev --fix-broken

Note: the libcur14-openssl-dev is the development version of the libcurl4, which could be used to build applications against libcurl (to include headers and some additional documentation). And there are actually different dev version of libcurl package that you could chose from depending on the backend TLS you would like to use: libcurl4-openssl-dev, libcurl4-nss-dev & libcurl4-gnutls-dev.

Share:
15,185

Related videos on Youtube

Xero
Author by

Xero

Updated on September 18, 2022

Comments

  • Xero
    Xero over 1 year

    I somehow got myself in a screwy situation on Ubuntu 18.04 where I have libcurl3 installed, something tried to install libcurl4, and now I'm stuck in a situation where Ubuntu can't install libcurl4 and because of that can't install anything as no matter what I try to do it first tries to install libcurl4 and fails.

    This is what I end up at:

    The following additional packages will be installed:
      libcurl4
    The following NEW packages will be installed:
      libcurl4
    0 upgraded, 1 newly installed, 0 to remove and 17 not upgraded.
    Need to get 214 kB of archives.
    After this operation, 641 kB of additional disk space will be used.
    Do you want to continue? [Y/n] y
    Ign:1 http://security.ubuntu.com/ubuntu bionic-security/main amd64 libcurl4 amd64 7.58.0-2ubuntu3.2
    Err:1 http://us.archive.ubuntu.com/ubuntu bionic-security/main amd64 libcurl4 amd64 7.58.0-2ubuntu3.2
      404  Not Found [IP: 2001:67c:1360:8001::17 80]
    E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/pool/main/c/curl/libcurl4_7.58.0-2ubuntu3.2_amd64.deb  404  Not Found [IP: 2001:67c:1360:8001::17 80]
    E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
    

    From the looks of it it's trying to grab a version of libcurl4 that straight up doesn't exist in the repos? How can I get it to grab the correct version?

    • N0rbert
      N0rbert over 5 years
      It seems that you forget to run sudo apt-get update. Execute this command and retry.
    • Xero
      Xero over 5 years
      Nope. I've literally run that hundreds of time.
  • N0rbert
    N0rbert over 5 years
    Please edit your answer with complete list of exact steps you did. This is needed to help future readers (and to make your method reproducible).
  • Cloud Cho
    Cloud Cho over 3 years
    Is there reason behind to use libcur14-openssl-dev instead of libcur14?
  • Zstack
    Zstack over 3 years
    @CloudCho the libcur14-openssl-dev is the development version of the libcurl4, which could be used to build applications against libcurl (to include headers and some additional documentation). And there are actually different dev version of libcurl package, that you could chose from depending on the backend TLS you would like to use: libcurl4-openssl-dev, libcurl4-nss-dev & libcurl4-gnutls-dev.