Apt-get - Error reading from server - read (32: Broken pipe) [IP: ::1 80]

By xngo on September 8, 2021

Issue

I was building my own Live Debian image and 1 of DEB packages failed to fetch. I got the following error:

E: Failed to fetch http://localhost/aptly-repo/master_bullseye-main/pool/main/d/djvulibre/libdjvulibre21_3.5.28-2_amd64.deb Error reading from server - read (32: Broken pipe) [IP: ::1 80]

Howver, other DEB package from the same repository are fetching fine.

Solution

Searching on the internet can't resolve my problem. After multiple tries and errors, run apt-get update before installing the package solve the issue. I don't know why.

About the author

Xuan Ngo is the founder of OpenWritings.net. He currently lives in Montreal, Canada. He loves to write about programming and open source subjects.