Apt-get error: E: The method driver /usr/lib/apt/methods/https could not be found

Apt-get error: E: The method driver /usr/lib/apt/methods/https could not be found

Category : How-to

Get Social!

I’ve been getting the following error when using apt-get update with Debian Wheezy recently.

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

It seems that apt-get only supports HTTP connections by default, and throws an error with any HTTPS URLs.  You’ll likely see this error message if you add a new apt source URL that starts with https. What’s most annoying is that apt doesn’t simply ignore the HTTPS URL when updating the local cache, it actually stops all updates regardless of URL schema.

apt-get update
E: The method driver /usr/lib/apt/methods/https could not be found.

Luckily the fix is easy and requires an additional apt package to handle the SSL URLs. Run the below command to install the apt-transport-https package to enable apt to use HTTPS URL lists.

apt-get install apt-transport-https

Once this is installed, apt should function and update its local cache from your apt lists.


10 Comments

dick

25-Jul-2016 at 11:18 pm

unable to locate package apt-transport-https

    james.coyle

    26-Jul-2016 at 9:36 pm

    You may need to remove any https URLs within /etc/apt/sources.list and /etc/apt/sources.list.d/* in order to perform an apt-get update. Then run the above command, then re-add the https sources.

      Anas Ayad

      7-Jul-2017 at 4:04 pm

      It took me hours for the stupid google to pins me out to your beautiful awesome unbelievable work-around. Thanks to you, you have save my day.

      micky

      2-Feb-2020 at 7:38 pm

      this worked!! thanks bruh

Sachin

3-Jun-2018 at 7:48 am

Thanks bro. was really helpful.

Henrik

1-Aug-2018 at 2:09 am

Man.. you save my day too! Freaking genius! Thanks again

Gurpreet Singh

23-Jan-2019 at 8:14 am

hello! mate… but the problem is still not resolved on my machine… i have installed kali 18.4 and below is in my /etc/apt/sources.list
It would be very helpful if you can help me to install docker on my machine.

#

# deb cdrom:[Debian GNU/Linux 2.0 _Sana_ – Official Snapshot amd64 LIVE/INSTALL$

#deb cdrom:[Debian GNU/Linux 2.0 _Sana_ – Official Snapshot amd64 LIVE/INSTALL $

# Line commented out by installer because it failed to verify:
deb http://security.kali.org/kali-security/ sana/updates main contrib non-free
# Line commented out by installer because it failed to verify:
deb-src http://security.kali.org/kali-security/ sana/updates main contrib non-f$

thanks & regards,
Gurpreet

Pawan

28-Aug-2019 at 5:41 pm

try doing

> apt install apt
surely it will work

Snigdha

26-Jun-2021 at 4:19 am

Thank you so much!

Shubham

20-Jan-2022 at 5:14 pm

does not work in my case

: The method driver /usr/lib/apt/methods/htpp could not be found.
N: Is the package apt-transport-htpp installed?
E: Failed to fetch htpp://archive.ubuntu.com/ubuntu/dists/(lsb_release/InRelease
E: Some index files failed to download. They have been ignored, or old ones used instead.

still getting this error.

Leave a Reply

Visit our advertisers

Quick Poll

Do you use GlusterFS in your workplace?

Visit our advertisers