Map to a given vector bundle from a split vector bundle Let $X$ be a connected scheme, smooth and proper over $\mathbb{C}$. Let $F$ be a locally free $\mathcal{O}_X$-module of finite rank $r>1$. Suppose on a non-empty affine open $U\subset X$ whose complement is irreducible we have an isomorphism of $\mathcal{O}_X$-modules $f:\mathcal{O}^{\oplus r}_X|_{U}\rightarrow F|_{U}$. 
Does there necessarily exist a locally free $\mathcal{O}_X$-module $L$ of rank $1$ with an identification $\mathcal{O}_X|_U\rightarrow L|_U$ such that there is a morphism of $\mathcal{O}_X$-modules $g:L^{\oplus r}\rightarrow F$ with $g|_{U}=f$?
 A: Yes. Slightly more precisely, we have the following result.

Proposition: Let $X$ be a normal, integral, finite-type scheme over a field.
  Let $F$ be a locally free $\mathcal O_X$-module of finite rank.
  Let $U\subseteq X$ be a nonempty open subset.
  Let $r$ be a nonnegative integer.
  Let $\phi : \mathcal O_U^{\oplus r}\to F|_U$ be an $\mathcal O_U$-linear map.
  Then there exists an effective Weil divisor $D$ supported on $X\setminus U$ and an $\mathcal O_X$-linear map $\bar \phi : \mathcal O_X(-D)^{\oplus r} \to F$ such that $\bar\phi|_U = \phi$.
  Furthermore, if $X$ is $\mathbb Q$-factorial, then the divisor $D$ can be chosen to be Cartier.

Proof: Given an effective Weil divisor $D$ on $X$ with support on $X\setminus U$, there exists at most one $\mathcal O_X$-linear map $\phi(D) : \mathcal O_X(-D)^{\oplus r} \to F$ such that $\phi(D)|_U = \phi$.
If $\phi(D)$ exists and $E$ is an effective Weil divisor supported on $X\setminus U$, then $\phi(D+E)$ exists, since we can take $\phi(D+E)$ to be the restriction of $\phi(D)$ to $\mathcal O_X(-D-E)^{\oplus r}\subseteq \mathcal O_X(-D)^{\oplus r}$.
In particular, if $\phi(D)$ exists, then $\phi(nD)$ exists for all positive integers $n$. 
The last statement of the proposition follows.
To find an effective Weil divisor $D$ on $X$ supported on $X\setminus U$ such that $\phi(D)$ exists, we may work locally on $X$.
Indeed, let $X=\bigcup_{i\in I} V_i$ be a finite Zariski-open cover. 
Suppose that, for each $i\in I$, there exists an effective Weil divisor $D_i$ on $V_i$ with support on $V_i\setminus U$ and an $\mathcal O_{V_i}$-linear map $\bar\phi_i : \mathcal O_{V_i}(-D_i)^{\oplus r}\to F|_{V_i}$ such that $\bar\phi_i|_{V_i\cap U} = \phi_{V_i\cap U}$.
For each $i\in I$, let $\overline D_i\subseteq X$ be the closure of $D_i \subseteq V_i$.
Let $D= \sum_{i\in I} \overline D_i$. 
Then $\mathcal O_X(-D)|_{V_i} \subseteq \mathcal O_{V_i}(-D_i)$ for all $i\in i$, and there exists a unique map $\bar\phi : \mathcal O_X(-D)^{\oplus r} \to F$ such that $\bar\phi|_{V_i} = \bar\phi_i|\mathcal O_{V_i}(-D\cap V_i)^{\oplus r}$ for all $i\in I$.
Thus we may assume that $F=\mathcal O_X^{\oplus f}$.
Then the $\mathcal O_U$-linear map $\phi : \mathcal O_U^{\oplus r}\to F|_U$ is given by multiplication by a matrix $[\phi_{ij}]$ of rational functions on $X$.
Let $D_1,\dotsc,D_m$ denote the irreducible components of $X\setminus U$ that have codimension 1 in $X$.
For each $l=1,\dotsc, m$, $i=1,\dotsc,f$ and $j=1,\dotsc,r$, let $n_l(i,j)\ge 0$ denote the order of the pole that the rational function $\phi_{ij}$ has at $D_l$.
For each $l=1,\dotsc, m$, let $n_l := \max_{i,j} n_l(i,j)$. 
Let $D= \sum_{i=1}^m n_l D_l$. 
Then $\phi(D)$ exists.
QED
