I got some information from a user on a more recent duplicate (bug 2063533). The problem seems to be that some users, when disabling the stub-resolver, also create a symlink /etc/resolv.conf -> /run/systemd/resolve/resolv.conf. This is not actually necessary because systemd-resolved will make stub-resolv.conf a symlink to resolv.conf when DNSStubListener=no.
I got some information from a user on a more recent duplicate (bug 2063533). The problem seems to be that some users, when disabling the stub-resolver, also create a symlink /etc/resolv.conf -> /run/systemd/ resolve/ resolv. conf. This is not actually necessary because systemd-resolved will make stub-resolv.conf a symlink to resolv.conf when DNSStubListener=no.
Hence, the command
cp "${DPKG_ ROOT}/etc/ resolv. conf" "${DPKG_ ROOT}/run/ systemd/ resolve/ stub-resolv. conf"
in systemd- resolved. postinst fails because the source and destination are *both* symlinks to /run/systemd/ resolve/ resolv. conf.