This question is being asked on behalf of a colleague of mine.

Let $X$ be a topological space. It is well known that the abelian category of sheaves on $X$ has enough injectives: that is, every sheaf can be monomorphically mapped to an injective sheaf. The proof is similarly well known: one uses the concept of "generators" of an abelian category.

It is also a standard remark in texts on the subject that on a general topological space $X$, the category of sheaves need *not* have enough projectives: there may exist sheaves which cannot be epimorphically mapped to by a projective sheaf. (Dangerous bend: this means projective in the categorical sense, not a locally free sheaf of modules.) For instance, Wikipedia remarks that projective space with Zariski topology does not have enough projectives, but that on any spectral space, a space homeomorphic to $\operatorname{Spec}R$, there are enough projective sheaves.

Two questions:

Who knows an actual proof that there are not enough projectives on, say, $\boldsymbol{P}^1$ over the complex numbers with the Zariski topology? What about the analytic topology, i.e. $\boldsymbol{S}^2$?

Is there a known necessary and sufficient condition on a topological space $X$ for there to be enough projectives?

EDIT: I meant the question to be purely for sheaves of abelian groups. Eric Wofsey points out that the results alluded to above on Wikipedia are not consistent when interpreted in this way, since $\boldsymbol{A}^1$ and $\boldsymbol{P}^1$, over an algebraically closed field $k$, with the Zariski topology are homeomorphic spaces: both have the cofinite topology.

I am pretty sure that when my colleague asked the question, he meant it in the topological category, so I won't try to change that. But the other case is interesting too. What if $(X,\mathcal{O}_X)$ is a locally ringed space. Does the abelian category of sheaves of $\mathcal{O}_X$-modules have enough projectives? I think my earlier warning still applies. Since for a scheme $X$ not every $\mathcal{O}_X$-module is coherent, it is not clear that "projective sheaves" means "locally free sheaves" here, even if we made finiteness and Noetherianity assumptions to get locally free and projective to coincide.