Stuck with apt --fix-broken install (libc6:amd64 package post-installation)
I ran into the same problem, and this procedure from this bug report fixed it:
Edit
/var/lib/dpkg/info/libc6\:amd64.postinst
and comment out the line
# set -e
so $
apt-get -f install
can continue.
You can use this sequence of commands (up to 3) to force a re-download of the partial files of the offending packages. Remaining steps are done to merge the new files with the old one, to avoid warnings and issues on non-offending packages that do not get downloaded in this attempt.
sudo mv /var/lib/dpkg/info /var/lib/dpkg/info_old
sudo mkdir /var/lib/dpkg/info
sudo apt-get update && sudo apt-get -f install
sudo mv /var/lib/dpkg/info/* /var/lib/dpkg/info_old
sudo rm -rf /var/lib/dpkg/info
sudo mv /var/lib/dpkg/info_old /var/lib/dpkg/info