Can we patch up line bundles?

Let X be a complex manifold. Suppose we have holomorphic line bundles $L_i$ over $U_i$ where ${U_i}$ is an open covering of X. Suppose that $L_i$ and $L_j$ restrict to the same line bundle over the intersection of $U_i$ and $U_j$.

Can we patch these local line bundles into a global holomorphic line bundle L over X? That is, the restriction of L to $U_i$ is $L_i$.

-
Of course; what causes problems? – Martin Brandenburg Sep 3 '10 at 8:36
As far as I know that is pretty much the definition of line bundle. – Jesus Martinez Garcia Sep 3 '10 at 8:56
If you really mean that the restrictions are equal, then yes, nothing could possibly go wrong. But that situation rarely (ever?) arises in practice. Normally what you have is that the bundles are isomorphic on the intersections, and then indeed an additional condition is needed, namely compatibility on the triple intersections (cocycle condition). Still, this is explained everywhere line bundles are peddled, so I find the question somewhat mysterious. – Pete L. Clark Sep 3 '10 at 9:46
As Pete points out, assuming you only mean "isomorphic" on overlaps then the answer in general is "no". For instance in a neighbourhood of a smooth cubic curve in $\mathbb P^2$ there is a whole elliptic curve of line bundles. Taking the rest of your covering of $\mathbb P^2$ to be sufficiently fine, you can assume that on overlaps these line bundles are trivial. So you'd be asking if you could glue these line bundles to trivial line bundles on the rest of $\mathbb P^2$. You cannot, because there are very few line bundles on $\mathbb P^2$ -- discrete set $\mathbb Z$ rather than a continuum. – Richard Thomas Sep 3 '10 at 10:47
usually line bundles are defined by patching up of local trivializations. i was wondering if we can patch up non-trivial patches of line bundles. – user2529 Sep 4 '10 at 6:00