There is a profound difference between "spontaneous symmetry breaking" and "anomalies". A global symmetry of the Hamiltonian (or the action functional) is called spontaneously broken, if the ground state is not symmetric. This necessarily implies that the ground state is degenerate, and the excitations connecting different ground states are thus massless (hand-waving argument for the validity of the Nambu-Goldstone theorem).
Note that local symmetries cannot get spontaneously broken, although many texbooks call the Higgs mechanism the spontaneous breaking of a local symmetry. That there is no spontaneous symmetry breaking is clear since here the ground state is not degenerate, because the apparent different ground states with the same energy are connected by a local gauge transformation, i.e., they are in fact the same state. That explains also why there are no massless Nambu-Goldstone bosons in this case but the degrees of freedom which would lead to Goldstone bosons if the symmetry were only global (the "would-be Goldstone modes") are eaten up by the corresponding gauge fields, providing the third component for each of these gauge bosons that refer to the corresponding part of the gauge group, and these gauge bosons get massless (e.g., the electroweak standard model is Higgsed from ##\mathrm{SU}(2) \times \mathrm{U}(1) \rightarrow \mathrm{U}_1##, i.e., of the four gauge boson degrees of freedom three get massive, and each of them eats thus up one of the would-be Goldstone modes, providing the third ##m=0## spin component for a massive vector boson.
Anomalies occur, if a symmetry of the classical action (no matter whether it's global or local) is no longer a symmetry in the quantized theory. This implies that in the quantized case there is no symmetry to begin with, and thus the symmetry of the classical action is explicitly broken. If this happens to a local gauge symmetry you can forget the entire model since a gauge theory whose gauge invariance is broken is unphysical (involving unphysical degrees off freedom in the dynamics leading to a non-unitary S-matrix, and the whole theory lacks physical meaning). For global symmetries anomalies are often welcome: E.g., in neutral-pion decay to 2 Gammas the anomalous breaking of axial U(1) symmetry leads to the correct decay rate for ##\pi^0 \rightarrow \gamma \gamma##. Mathmatically there are also remnants of the classical symmetry left, in terms of socalled anomalous Ward identities.