  Despite the spectacular discovery of an astrophysical neutrino flux by
IceCube in 2013, its origin remains a mystery. Whatever its sources, we expect
the neutrino flux to be accompanied by a comparable gamma-ray flux. These
photons should be degraded in energy by electromagnetic cascades and contribute
to the diffuse GeV-TeV flux precisely measured by the Fermi-LAT. Population
studies have also permitted to identify the main classes of contributors to
this flux, which at the same time have not been associated with major neutrino
sources in cross-correlation studies. These considerations allow one to set
constraints on the origin and spectrum of the IceCube flux, in particular its
low-energy part. We find that, even accounting for known systematic errors, the
Fermi-LAT data exclude to at least 95% C.L. any extragalactic transparent
source class, irrespective of its redshift evolution, if the neutrino spectrum
extends to the TeV scale or below. If the neutrino spectrum has an abrupt
cutoff at $\sim10$ TeV, barely compatible with current observations, the
tension can be reduced, but this way out requires a significant modification to
the current understanding of the origin of the diffuse extragalactic gamma-ray
flux at GeV energies. In contrast, these considerations do not apply if a
sizable fraction of IceCube data originates within the Galactic halo (a
scenario however typically in tension with other constraints) or from a yet
unidentified class of "opaque" extragalactic emitters, which do not let the
high-energy gamma rays get out.
