  We point out that the duality symmetry of free electromagnetism does not hold
in the quantum theory if an arbitrary classical gravitational background is
present. The symmetry breaks in the process of renormalization, as also happens
with conformal invariance. We show that a similar duality-anomaly appears for a
massless scalar field in $1+1$ dimensions.
