Local to global deformation of invertible sheaves Let $\pi:X \to S$ be a flat, projective morphism, $S$ irreducible. Suppose that for all $s \in S$, the fiber $X_s$ satisfies $h^2(\mathcal{O}_{X_s})=0$. This means in particular that given an invertible sheaf $\mathcal{L}_0$ on $X_{s_0}$, for some $s_0 \in S$, there exists no obstruction to infinitesimal deformation of the invertible sheaf $\mathcal{L}_0$ (see $\S 6$ of Hartshorne's "Deformation theory"). My question is: does there exist an invertible sheaf $\mathcal{L}$ on $X$ such that $\mathcal{L}|_{X_{s_0}} \cong \mathcal{L}_0$? Any reference will be most welcome (I am looking for techniques to go from local to global deformation of invertible sheaves).
 A: The answer is no, even for locally constant families. Let $F$ be a smooth projective variety with an automorphism $\sigma$, and let $L$ be a line bundle on $F$ such that $\sigma^* L$ is not isomorphic to $L$. For example, take $F=\mathbf{P}^1\times \mathbf{P}^1$ with $\sigma$ the coordinate-switching involution, and $L=\mathcal{O}(1,0)$. Take $S$ to be the nodal curve obtained by gluing $0$ to $\infty$ on $\mathbf{P}^1$, and let $X$ be obtained from $F\times \mathbf{P}^1$ by identifying $(f, 0)$ and $(\sigma(f), 1)$. The natural $X\to S$ is a locally trivial fibration with fiber $F$. Take $s$ to be the node and $L_0$ to be $L$.
Think about it this way: in general, suppose that $X\to S$ is nice enough so that there exists a relative Picard scheme $P\to S$. The assumption that $H^2(X_s, \mathcal{O})=0$ for all $s\in S$ implies that $P\to S$ is (formally) smooth, and so every section over a point (i.e. your $\mathcal{L}_0$) extends to an infinitesimal/formal/etale neighborhood. But there is no reason to have a non-zero global section of $P\to S$ at all.
