I tried to update my OS Debian jessie using the terminal and i get an error :

“E: The method driver /usr/lib/apt/methods/https could not be found.” error?

My sources.list :

deb http://httpredir.debian.org/debian/ jessie main
deb-src http://httpredir.debian.org/debian/ jessie main

deb http://security.debian.org/ jessie/updates main
deb-src http://security.debian.org/ jessie/updates main

# jessie-updates, previously known as 'volatile'
deb http://httpredir.debian.org/debian/ jessie-updates main
deb-src http://httpredir.debian.org/debian/ jessie-updates main

deb http://ftp.de.debian.org/debian jessie main 

How to fix apt-get update and aptitude update?

  • 1
    Keep in mind that there's no integrity benefit to using HTTPS since packages have signatures that are verified anyway - which is probably even better since you're not trusting many independent CAs. THere ay be some privacy benefit. See also: unix.stackexchange.com/questions/90227/… – Bob Feb 18 '16 at 0:07

Sounds like you may have added some https sources. Since there are no https sources in your sources.list, it would be something in /etc/apt/sources.list.d/.

You may also be dealing with a proxy that always redirects to https.

You can add support for https apt sources by installing a couple of packages:

apt-get install apt-transport-https ca-certificates

If your apt-get is too broken to do this, you can download the package directly and install it with dpkg -i. Any additional dependencies of that package can be tracked down and fetched similarly (dpkg will let you know if anything is missing).

If it still doesn't work, you might try editing the source entry to use http instead of https, or just remove it and start over following the source maintainer's instructions.

  • For me, installing "apt-transport-https" and "ca-certificates" didn't fix the issue, but updating the files in "/etc/apt/sources.list.d/" (for me it was nodesource.list) to use http instead of https fixed it – Harendra Singh Nov 28 '18 at 9:44
  • sudo dpkg -i <deb for apt-transport-https> worked for me, but that install had dependencies that I had to fix with apt-get update, which the package install for apt-transport-https allowed me to perform. – HeatfanJohn Feb 20 '19 at 20:55
  • 2
    "Unable to locate package apt-transport-https" – Anentropic Mar 21 '19 at 14:01
  • This totally fixed it for me! Thank you thank you thank you! – Mike Wills Apr 3 '19 at 1:53
  • 1
    For me it actually turned out that an http source was the cause of the above issue. Removing the corresponding file in /etc/apt/sources.list.d/ fixed it. – balu Apr 30 '19 at 9:01

For me this issue happened because one of the mirrors happened to always redirect to https. So none of my sources were https, but due to the redirect, apt would end up trying to fetch something off an https site. To resolve this, I had to manually download and install:

  • libcurl3-gnutls and
  • apt-transport-https

(apt-transport-https had a dependency on libcurl3-gnutls).

Once those were installed, I was able to successfully install any other package, even if the mirror was on https.


There are a few possible incidents which lead to this type of issues. The most likely solution would be to run:

apt-get update
apt-get install apt-transport-https

You can find more details and possible causes for this issue here.

  • 2
    In Docker when this comes up you'll often need to run this BEFORE you add the source which uses https, or the apt-get update and apt-get install will fail due to inability to read from https. – Nucleon Jul 30 '20 at 18:20

First check

/etc/apt/sources.list.d# ls -l

insgesamt 16
-rw-r--r-- 1 root root 142 Okt 12 14:12 jtaylor-keepass-jessie.list
-rw-r--r-- 1 root root 332 Okt 12 14:07 sources.list
-rw-r--r-- 1 root root  85 Okt 12 14:13 ubuntuzilla.list
-rw-r--r-- 1 root root  78 Okt  8 09:13 ubuntuzilla.list.save

Remove all other let only sources.list

edit sources.list

/etc/apt/sources.list.d# cat sources.list 
deb http://security.debian.org/debian-security jessie/updates main    
deb http://ftp.debian.org/debian/ jessie-updates contrib main   
deb-src http://security.debian.org/ jessie/updates contrib main  
deb-src http://ftp.debian.org/debian/ jessie-updates contrib main 

try again:

sudo apt-get install apt-transport-https
sudo apt-get update
sudo apt-get upgrade

If this did't work then install over browser:

to select a package:




Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.