This seems like it should be easy, but unfortunately I don't see how to do it.
Let $X$ be a variety; I'm happy to assume that $X$ is quasiprojective. If $L_1$ and $L_2$ are two non-isomorphic line bundles on $X$, then can we find a curve $C$ in $X$ such that $L_1$ and $L_2$ restrict to non-isomorphic bundles on $C$? (In other words, is non-isomorphism of line bundles detected by curves?)
I think that for a general hyperplane section $H$ of $X$, the map $Pic(X) \rightarrow Pic(H)$ should be injective for some range of dimensions, which maybe breaks down for surfaces. So this reduces immediately to the case of $\dim X \approx 2$, but then...