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

Quick Summary

  • Run apt-get update, then apt-get install apt-transport-https, as root or with sudo, to give apt the missing HTTPS transport.
  • The error means apt lacks an HTTPS transport for an https:// repository, typical on older Debian or Ubuntu servers; newer apt builds it in.
  • If apt-get update itself fails, comment out the HTTPS repository line in /etc/apt/sources.list or sources.list.d, run both commands, then restore it.

When apt-get stops with The method driver /usr/lib/apt/methods/https could not be found, apt is trying to download from a package repository over HTTPS but has no HTTPS transport available. There are a few possible causes, but this usually shows up on older Debian or Ubuntu servers, for example a VPS, where a repository address starts with https://.

The most likely solution is to refresh the package lists and install the HTTPS transport. Run the commands as root, or put sudo in front of each one:

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

What the commands do

  • apt-get update downloads fresh package lists from the repositories configured on your server.
  • apt-get install apt-transport-https installs the package that lets apt download from HTTPS sources. Newer apt versions have HTTPS support built in, and there the package is only a transitional one.

If the update itself fails

If apt-get update can’t get past the HTTPS repository, temporarily comment out that repository’s line in /etc/apt/sources.list or in its file under /etc/apt/sources.list.d/. Run both commands, then enable the line again and run apt-get update once more.

You can find more details and other possible causes for this issue in this Ask Ubuntu thread.

Share on X (opens in a new tab) Share on LinkedIn (opens in a new tab) Share on Facebook (opens in a new tab)

ChatGPT (opens in a new tab) Claude (opens in a new tab) Gemini (opens in a new tab) Perplexity (opens in a new tab) Grok (opens in a new tab)

More Insights

See More