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:
apt-get update
apt-get install apt-transport-httpsWhat the commands do
apt-get updatedownloads fresh package lists from the repositories configured on your server.apt-get install apt-transport-httpsinstalls 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.
Related articles
- installing the PHP SOAP extension with apt: another package install on a Debian server
- setting up Memcached on Debian: installing and configuring a cache service with apt

