Unable to install curl on Debian

6,176

The libcurl3-gnutls (= 7.47.0-1) package come from testing and it is installed ,to fix curl's dependencies you need to downgrade libcurl3-gnutls version from 7.47 to 7.38 using aptitude (because it's more helpful than apt-get) .

Open the terminal and type the following command :

sudo aptitude -f install libcurl3-gnutls

Follow the instructions and choose to downgrade the package.

Share:
6,176

Related videos on Youtube

Mehdi
Author by

Mehdi

Studying IT, fan of new technologies and Nao robot developer. Photography enthusiast, music lover and comics reader. That's pretty much what's about me.

Updated on September 18, 2022

Comments

  • Mehdi
    Mehdi over 1 year

    I am trying to install Curl on Debian but unfortunately I get the following error:

    The following packages have unmet dependencies: curl : Depends: libcurl3-gnutls (= 7.47.0-1) but 7.38.0-4+deb8u2 is to be installed E: Unable to correct problems, you have held broken packages.

    I tried to solve that by using: sudo apt-get autoremove as another thread suggested it but I keep having the same issue.

    How can I solve that ?

    Edit:

    Here's the output of apt-cache policy:

    Package files:
     100 /var/lib/dpkg/status
         release a=now
     500 http://ftp.debian.org/debian/ testing/non-free Translation-en
     500 http://ftp.debian.org/debian/ testing/main Translation-en
     500 http://ftp.debian.org/debian/ testing/contrib Translation-en
     500 http://ftp.debian.org/debian/ testing/non-free amd64 Packages
         release o=Debian,a=testing,n=stretch,l=Debian,c=non-free
         origin ftp.debian.org
     500 http://ftp.debian.org/debian/ testing/contrib amd64 Packages
         release o=Debian,a=testing,n=stretch,l=Debian,c=contrib
         origin ftp.debian.org
     500 http://ftp.debian.org/debian/ testing/main amd64 Packages
         release o=Debian,a=testing,n=stretch,l=Debian,c=main
         origin ftp.debian.org
     500 http://security.debian.org/ jessie/updates/non-free Translation-en
     500 http://security.debian.org/ jessie/updates/main Translation-en
     500 http://security.debian.org/ jessie/updates/contrib Translation-en
     500 http://security.debian.org/ jessie/updates/non-free amd64 Packages
         release v=8,o=Debian,a=stable,n=jessie,l=Debian-Security,c=non-free
         origin security.debian.org
     500 http://security.debian.org/ jessie/updates/contrib amd64 Packages
         release v=8,o=Debian,a=stable,n=jessie,l=Debian-Security,c=contrib
         origin security.debian.org
     500 http://security.debian.org/ jessie/updates/main amd64 Packages
         release v=8,o=Debian,a=stable,n=jessie,l=Debian-Security,c=main
         origin security.debian.org
     500 http://mirrors.online.net/debian/ jessie/non-free Translation-en
     500 http://mirrors.online.net/debian/ jessie/main Translation-en
     500 http://mirrors.online.net/debian/ jessie/contrib Translation-en
     500 http://mirrors.online.net/debian/ jessie/contrib amd64 Packages
         release v=8.4,o=Debian,a=stable,n=jessie,l=Debian,c=contrib
         origin mirrors.online.net
     500 http://mirrors.online.net/debian/ jessie/non-free amd64 Packages
         release v=8.4,o=Debian,a=stable,n=jessie,l=Debian,c=non-free
         origin mirrors.online.net
     500 http://mirrors.online.net/debian/ jessie/main amd64 Packages
         release v=8.4,o=Debian,a=stable,n=jessie,l=Debian,c=main
         origin mirrors.online.net
    Pinned packages:
         nginx -> 1.10.0-1
    

    And here's the content of /etc/apt/sources.list:

    # deb http://mirrors.online.net/debian jessie main
    
    deb http://mirrors.online.net/debian jessie main non-free contrib
    deb-src http://mirrors.online.net/debian jessie main non-free contrib
    
    deb http://security.debian.org/ jessie/updates main contrib non-free
    deb-src http://security.debian.org/ jessie/updates main contrib non-free
    
    deb http://ftp.debian.org/debian/ testing main contrib non-free
    deb-src http://ftp.debian.org/debian/ testing main contrib non-free
    
    • Stephen Kitt
      Stephen Kitt almost 8 years
      Could you edit your question to include the output of apt-cache policy?
    • GAD3R
      GAD3R almost 8 years
      Please add the output of cat /etc/apt/sources.list too.
    • Mehdi
      Mehdi almost 8 years
      @StephenKitt I just edited my question.
  • Mehdi
    Mehdi almost 8 years
    Thanks for your answer GAD3R ! Aptitude didn't gave me the option to just downgrade libcurl3-gnutls so i deleted it with sudo apt-get remove libcurl3-gnutls and then I installed the version needed by curl (7.38.0-4+deb8u3).
  • realtebo
    realtebo almost 5 years
    libcurl3 has not candidates to install - What damn?!