On the definition of locally free module sheaf A sheaf of $\mathcal{O}_X$-modules $\mathcal{F}$ is by definition locally free iff there is an open covering $X = \bigcup_i U_i$ such that each $\mathcal{F}|_{U_i}$ is free as a sheaf of $\mathcal{O}_X|_{U_i}$-modules.
I was wondering if this is equivalent to each $\mathcal{F}(U_i)$ being free as $\mathcal{O}_X(U_i)$ module? It doesn't seem to be the case since every book uses the first phrasing, but I can't come up with a counterexample.
 A: Let $X$ be a ringed space, $x \in |X|$ a point and $M$ be any $\mathcal{O}_{X,x}$-module. Let $i_* M$ be the pushforward along $i : \{x\} \to X$. This is an $\mathcal{O}_X$-module with  $\Gamma(X,i_* M) = M|_{\Gamma(X,\mathcal{O}_X)}$, the module$^1$ given by scalar restriction along the ring map $\Gamma(X,\mathcal{O}_X) \to \mathcal{O}_{X,x}$, $s \mapsto s_x$. So if $M|_{\Gamma(X,\mathcal{O}_X)}$ is a free module, which happens for example when $\Gamma(X,\mathcal{O}_X)$ is a field, then $\Gamma(X,i_* M)$ is a free module; but there is no reason to assume that $i_* M$ is locally free. In fact, if $x$ is closed, then one knows that the stalks of $i_* M$ are given by:
$$(i_* M)_y = \left\{ \begin{array}{cc} M & y = x \\ 0 & y \neq x \end{array}\right.$$
For this reason one often calls $i_* M$ a "skyscraper sheaf". Now assume $M \neq 0$. If there was an open neighborhood $U$ of $x$ such that $(i_* M)|_U$ is free, say $\cong \mathcal{O}_U^{\oplus I}$ for some set $I$, then $I \neq \emptyset$ (otherwise $M=0$), which implies $U=\{x\}$ (since $(i_* M)_y=0$ for $y \in U \setminus \{x\}$), i.e. $x$ is an isolated point. In that case, $X$ splits as the disjoint union of the spaces $\{x\}$ and $X \setminus \{x\}$, and $i_* M$ is indeed free, as long as $M$ is free. But if $x$ is not isolated, then $i_* M$ won't be locally free.
So here is an explicit example: Let $X=\mathbb{P}^1_k$ over some field $k$ (so that $\Gamma(X,\mathcal{O}_X)=k$ is a field) and take any closed point $x$. Take $M=\mathcal{O}_{X,x}$. Then the skyscraper sheaf $i_* M$ is not locally free, but $\Gamma(X,i_* M)$ is free.
$^1$Usually this module is simply denoted by $M$, since most people would like to forget forgetful functors; but this object really differs from $M$.
A: This is not the same. Consider the constant sheaf $k$ on projective space $\mathbb{P}^n$, and consider the singleton cover $U = \mathbb{P}^n$. The sections of the constant sheaf over $U$ are $k$, which is free of rank one over $\mathcal{O}(\mathbb{P}^n) = k$. But of course it is not true that the constant sheaf is locally free.
