How to fix E: Sub-process /usr/lib/apt/methods/https received a segmentation fault in APT

APTINTERMEDIATEHIGHUpdated Dec 29, 2025· 175 views

The HTTPS method in APT crashes during package operations with a segmentation fault, preventing apt-get update and upgrades. This usually stems from missing transport packages, corrupted cache files, or libc issues.

Quick fix

Fixes E: Sub-process /usr/lib/apt/methods/https received a segmentation fault

sudo apt-get install apt-transport-https
  1. Install apt-transport-https package
  2. Clear corrupted APT cache files
  3. Check for problematic HTTPS repository entries
  4. Increase APT cache allocation (memory-constrained systems)
apt — error
sudo apt-get install apt-transport-https
E: Sub-process /usr/lib/apt/methods/https received a segmentation fault

What this error means

This error occurs when APT's HTTPS method handler crashes unexpectedly. The /usr/lib/apt/methods/https process is responsible for handling secure connections to package repositories. When it receives a segmentation fault (SIGSEGV), it means the process encountered a memory access violation and terminated. This prevents APT from downloading and installing packages over HTTPS.

Typical symptoms

  • apt-get update fails immediately when processing HTTPS repositories
  • apt-get upgrade crashes before downloading packages
  • apt commands fail with 'Method https has died unexpectedly'
  • Works with HTTP repositories but not HTTPS
  • Error appears in WSL2, Docker containers, or Raspberry Pi systems

Common causes

  1. Missing apt-transport-https package (most common on minimal installations)
  2. Corrupted APT cache files in /var/cache/apt/*.bin
  3. HTTPS repository misconfiguration or corrupted repository metadata
  4. Memory allocation issues or insufficient cache size
  5. System libc or libstdc++ corruption
  6. WSL2 or Docker environment-specific transport issues

How to fix "E: Sub-process /usr/lib/apt/methods/https received a segmentation fault"

1Install apt-transport-https package

The most common fix is installing the HTTPS transport handler:

bash
sudo apt-get install apt-transport-https

This package provides the actual HTTPS method implementation. If apt-get itself is broken, you may need to bootstrap it with HTTP first by temporarily switching HTTPS repositories to HTTP.

2Clear corrupted APT cache files

Remove the binary cache files that may be corrupted:

bash
sudo rm /var/cache/apt/*.bin
sudo apt-get update

This forces APT to rebuild its cache from scratch. The *.bin files are memory-mapped caches that can become corrupted if the system crashes or runs out of memory.

3Check for problematic HTTPS repository entries

Review your sources lists for HTTPS repositories that may be causing issues:

bash
cat /etc/apt/sources.list
ls /etc/apt/sources.list.d/

Temporarily comment out any HTTPS repositories you added, keeping only the official Ubuntu/Debian ones. You can re-add them after apt-transport-https is installed:

bash
sudo nano /etc/apt/sources.list
# Change: deb https://... to # deb https://...
sudo apt-get update
4Increase APT cache allocation (memory-constrained systems)

If you're on a system with limited memory (Raspberry Pi, embedded systems), increase the cache size:

bash
echo 'APT::Cache-start 200000000;' | sudo tee -a /etc/apt/apt.conf

This tells APT to allocate 200MB instead of the default, preventing segfaults on memory-constrained systems.

5Reinstall APT packages if other methods fail

As a last resort, manually download and reinstall APT:

bash
# On another working system or using wget:
wget http://archive.ubuntu.com/ubuntu/pool/main/a/apt/apt_*.deb
wget http://archive.ubuntu.com/ubuntu/pool/main/a/apt/libapt-*.deb

# Then on the broken system:
sudo dpkg -i apt_*.deb libapt_*.deb
sudo apt-get install -f  # Fix any broken dependencies

Match the version numbers to your Ubuntu/Debian release.

6For Docker/WSL2 environments

If you're in a Docker container or WSL2, try installing apt-transport-https before adding HTTPS repositories:

dockerfile
RUN apt-get update && apt-get install -y apt-transport-https

For Docker, ensure your Dockerfile doesn't mix HTTPS repositories with the initial apt-get update. In WSL2, verify your system clock is synchronized (time skew can cause HTTPS issues):

bash
sudo ntpdate -s time.nist.gov

Advanced notes

The underlying bug was fixed in Debian APT in 2009 for HTTP but the HTTPS method handler received the fix much later, affecting Ubuntu Trusty and older Raspberry Pi distributions. On resource-constrained systems, APT may fail to allocate enough memory for the package index, causing segfaults before it even connects to HTTPS. WSL2 has environment-specific issues with HTTPS transport that sometimes require using the Microsoft-provided package manager (apt-utils) or upgrading WSL2 kernel. If you see 'Problem with MergeList' errors, your /var/lib/dpkg/status file may be corrupted—in that case, you'll need to recover from a backup or reinstall the system.

Frequently asked questions

What does "E: Sub-process /usr/lib/apt/methods/https received a segmentation faul" mean?
This error occurs when APT's HTTPS method handler crashes unexpectedly. The /usr/lib/apt/methods/https process is responsible for handling secure connections to package repositories. When it receives a segmentation fault (SIGSEGV), it means the process encountered a memory access violation and terminated.
How do I fix "E: Sub-process /usr/lib/apt/methods/https received a segmentation faul"?
The HTTPS method in APT crashes during package operations with a segmentation fault, preventing apt-get update and upgrades. This usually stems from missing transport packages, corrupted cache files, or libc issues.
What causes "E: Sub-process /usr/lib/apt/methods/https received a segmentation faul"?
Missing apt-transport-https package (most common on minimal installations) Corrupted APT cache files in /var/cache/apt/*.bin HTTPS repository misconfiguration or corrupted repository metadata
Is the "E: Sub-process /usr/lib/apt/methods/https received a segmentation faul" error serious?
Yes. This is a high-severity error that usually blocks work until it is fixed, but the steps above resolve it.

Official resources & further reading