Using the generalized hamiltonian method of Batalin, Fradkin and Vilkovisky, we investigate the algebraic structure of anomalies in the Polyakov string theory that appear as the Schwinger terms in super-commutation relations between BRST charge and total hamiltonian. We obtain the most general form of the anomalies in the extended phase space, without any reference to a two dimensional metric. This pregeometri- cal result, refered to as the genelarized Virasoro anomaly, independent of the gauge and the regularization under a minor assumption, is a non-perturbative result, and valid for any space-time dimension. In a configuration space, in which the two dimensional metric can be identified, we can geometrize the result without assuming the weak gravitational field, showing that the most general anomaly exactly exhibits the Weyl anomaly.