We derive the general form of the anomaly for chiral spinors and self-dual
antisymmetric tensors living on D-brane and O-plane interesections, using both
path-integral and index theorem methods. We then show that the anomalous
couplings to RR forms of D-branes and O-planes in a general background are
precisely those required to cancel these anomalies through the inflow
mechanism. This allows, for instance, for local anomaly cancellation in generic
orientifold models, the relevant Green-Schwarz term being given by the sum of
the anomalous couplings of all the D-branes and O-planes in the model.Comment: 24 pages, LaTex file, no figure