How to fix E: The method driver /usr/lib/apt/methods/https could not be found in APT
This error occurs when apt tries to access HTTPS repositories but the necessary https transport method is not installed. Install the apt-transport-https package to resolve it.
Quick fix
Fixes E: The method driver /usr/lib/apt/methods/https could not be found
sudo apt-get install apt-transport-https
sudo apt-get update- Install apt-transport-https
- If installation fails, remove HTTPS sources temporarily
- Update apt and install the package
- Re-enable HTTPS sources
sudo apt-get install apt-transport-httpssudo apt-get updateE: The method driver /usr/lib/apt/methods/https could not be found
What this error means
When you run apt-get update or apt-get install, apt needs to fetch packages from repositories using various protocol methods (HTTP, HTTPS, FTP, etc.). By default, apt only has the HTTP method available. When your sources.list or sources.list.d files contain HTTPS URLs, apt cannot find the corresponding driver to handle them, causing this error. The error is your system telling you that apt attempted to use the HTTPS protocol handler but it doesn't exist.
Typical symptoms
- apt-get update fails with "E: The method driver /usr/lib/apt/methods/https could not be found"
- apt-get install commands fail when repositories use HTTPS URLs
- You see a helpful hint: "N: Is the package apt-transport-https installed?"
- The error occurs even though you have no HTTPS sources if a mirror redirects to HTTPS
Common causes
- apt-transport-https package is not installed on the system
- A repository mirror is broken and redirects HTTP requests to HTTPS
- HTTPS sources were added to sources.list or sources.list.d without installing the required package
- Fresh system installation or container image without the https transport module
How to fix "E: The method driver /usr/lib/apt/methods/https could not be found"
The simplest solution is to install the missing package:
sudo apt-get install apt-transport-https
sudo apt-get updateThis installs the HTTPS method driver and should resolve the issue immediately.
If you cannot install apt-transport-https because apt itself is broken, you need to remove the problematic HTTPS sources first:
# Edit your main sources list
sudo nano /etc/apt/sources.listComment out any lines starting with https:// by adding # at the beginning. Then check your sources.list.d directory:
ls /etc/apt/sources.list.d/For any .list files containing HTTPS URLs, either comment them out or temporarily rename them:
sudo mv /etc/apt/sources.list.d/example-https.list /etc/apt/sources.list.d/example-https.list.bakOnce HTTPS sources are removed, update apt and install the required package:
sudo apt-get update
sudo apt-get install apt-transport-httpsNow you can re-enable the HTTPS sources and update again.
After apt-transport-https is installed, restore your HTTPS sources:
# Uncomment lines in /etc/apt/sources.list
sudo nano /etc/apt/sources.list
# Restore .list files in sources.list.d
sudo mv /etc/apt/sources.list.d/example-https.list.bak /etc/apt/sources.list.d/example-https.list
# Update apt with HTTPS sources now available
sudo apt-get updateIf automated installation still fails, manually download and install the package. First, identify your architecture:
dpkg-architecture -qDEB_HOST_ARCHThen download the .deb file for your system. For Raspbian/Debian ARM systems:
wget http://mirrordirector.raspbian.org/raspbian/pool/main/a/apt/apt-transport-https_1.0.9.8.4_armhf.deb
sudo dpkg -i apt-transport-https_1.0.9.8.4_armhf.debFor Ubuntu systems, find the correct URL from archive.ubuntu.com or a mirror site, matching your release and architecture.
Advanced notes
Modern apt versions (after 2016) typically include HTTPS support by default in fresh installations, but systems upgraded from older versions or minimal container images may lack it. Some environments like Docker containers or chroot jails may have stripped this package to reduce image size. The HTTPS transport method is essential for secure package management over HTTPS connections. If you encounter this in Docker, ensure your Dockerfile installs apt-transport-https early in the build process before adding HTTPS-based sources.
Frequently asked questions
- What does "E: The method driver /usr/lib/apt/methods/https could not be found" mean?
- ). By default, apt only has the HTTP method available. d files contain HTTPS URLs, apt cannot find the corresponding driver to handle them, causing this error.
- How do I fix "E: The method driver /usr/lib/apt/methods/https could not be found"?
- This error occurs when apt tries to access HTTPS repositories but the necessary https transport method is not installed. Install the apt-transport-https package to resolve it.
- What causes "E: The method driver /usr/lib/apt/methods/https could not be found"?
- apt-transport-https package is not installed on the system A repository mirror is broken and redirects HTTP requests to HTTPS HTTPS sources were added to sources.list or sources.list.d without installing the required package
- Is the "E: The method driver /usr/lib/apt/methods/https could not be found" error serious?
- It is a medium-severity error โ more of a blocker than a risk. The steps above resolve it.
Official resources & further reading
- ๐APT Official Documentation
- ๐GitHub Issue - crouton project(GitHub)
- ๐ฌRaspberry Pi Forums discussion(Stack Overflow)