extension of line bundles

Let $X/k$ be a normal variety and $U \subseteq X$ open with closed complement of codimension $\geq 2$. Let $\mathscr{L}/U$ be a line bundle. Is there a unique extension of $\mathscr{L}$ to a line bundle on $X$, i.e. is $\mathrm{Pic}(X) \to \mathrm{Pic}(U)$ an isomorphism? If $X$ is locally factorial, this is true by the isomorphism $\mathrm{Pic}(X) = \mathrm{Cl}(X)$ and the corresponding statement for the Weil divisor class group.

For global sections, this holds by [EGA IV${}_2$], p. 115, Théorème 5.10.5 since a normal variety is (S2).

• No, in general the map of Picard groups is not an isomorphism. – Mohan Dec 26 '16 at 15:13
• Do you have a counterexample? – user3267 Dec 26 '16 at 15:14
• Take $X$ to be the hypersurface defined by $x^2-yz=0$ in $\mathbb{A}^3$, line bundle defined by the ideal $(x,y)$ on $U=X-\{0,0,0\}$. – Mohan Dec 26 '16 at 15:18

One way to think about this question is: since $X$ is normal, it is $S_2$, and so any line bundle $\mathcal M$ on $X$ is $S_2$ (since it is locally isomorphic to $\mathcal O_X$). On the other hand, any line bundle $\mathcal L$ on $U$ has a unique extension to an $S_2$ torsion free coherent sheaf $\mathcal M$ on $X$, namely $\mathcal M := j_* \mathcal L$. (Here $j: U \to X$ is the inclusion.)
So the question becomes: is $j_*\mathcal L$ necessarily an invertible sheaf, to which the answer (as Mohan notes in comments) is no.
A more geometric way to think about the question is: if $D$ is an effective Cartier divisor in $U$, then is its Zariski closure in $X$ (which is a Weil divisor) again necessarily a Cartier divisor? Mohan's counterexample is the famous "first example" of a non-Cartier Weil divisor, which nevertheless becomes Cartier after deleting the cone point.
• If $\mathrm{Pic}(X)$ is finitely generated, does it follow that $\mathrm{Pic}(U)$ is finitely generated? – user3267 Dec 29 '16 at 16:26