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.
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.