TITLE: When is $CaCl(X) \to Pic(X)$ surjective?
QUESTION [9 upvotes]: I am curious about following similar statements in algebraic geometry and complex geometry:


Algebraic Geometry Version:
    If $X$ is an integral scheme, the map from Cartier divisor group to Picard group (i.e. group of invertible sheaves) $CaCl(X) \to Pic(X)$ is surjective.
Complex Geometry Version: If $X$ is a complex manifold, then the image of   $CaCl(X) \to Pic(X)$ is generated by those line bundles $L \in Pic(X)$ with $H^0(X,L) \neq 0$.


More interesingly, there is a remark for the complex version:  


Remark: $CaCl(X) \to Pic(X)$ may not be surjective even for very easy manifolds, e.g. a generic complex torus of dimension two, this is no longer the case.


My questions is twofold:
Explicit one: How to justify the above remark, i.e. $CaCl(X) \to Pic(X)$ may not be surjective for a generic complex torus of dimension two.
Inexplicit one: Though I don't know the exact meaning of "integral manifold" (or the proper prototype of integral scheme ), it seems for me that "integrality" is natrual endowed by a complex manifold(suppose it is connected). And thus, the difference is quite unexpected. How could this come out, and what are reasonable category to guarantee subjectivity.

REPLY [10 votes]: For any complex torus $X$ of dimension $n$ the set of isomorphism classes of holomorphic line bundles  $Pic(X)$ is a huge group: already the group $Pic^0(X)$ of line bundles $L$  with  zero Chern class ($c_1(L)=0$) is itself a complex torus of  dimension $n$ , called the dual torus $\hat X=Pic^0(X)$.  
However there exist two-dimensional complex tori $X$ having no curves at all , so that its group of divisors is zero (see here for a detailed  analysis).   
So for such tori no non-trivial line bundle comes from a divisor.
A "philosophical" explanation
For integral (= reduced and irreducible) schemes  Hartshorne proves that every line bundle comes from a divisor in Proposition II,6.15
The proof uses that sheaves that are constant on some open covering of $X$ are constant on the whole of $X$.
This is due to irreducibility: two non-empty open subsets of $X$ have non-empty intersection.
But this is  completely false for complex manifolds since  a Hausdorff space containing at least two points  is never irreducible.
A variant of this  explanation is that on an integral scheme a rational function defined on an open subset of the scheme extends  to a rational function on the whole scheme, whereas the analogous result for meromorphic functions on a complex manifold is completely false .