Let $(f_n)_n$ be a sequence of real functions such that :
- $f_n\in L^1(\mathbb{R},\mu)$, for some probability measure $\mu$ on $\mathbb{R}$.
- For any compact set $K$ of $\mathbb{R}$ $f_{n}|_K$ converge uniformly on $K$ to a function $f: \mathbb{R} \to \mathbb{R}$.
- $f\in L^1(\mathbb{R},\mu)$.
Can I deduce that $f_n \stackrel{L^1(\mu)}{\longrightarrow} f$ ?
The result holds iff $\mu(K)=1$ for some compact $K.$
Proof: Suppose the result holds. Assume, to reach a contradiction, that $\mu(K)<1$ for all compact $K.$ It follows that there are integers $0<m_1<m_2<\cdots $ such that $\mu(\{x:m_n<|x|<m_{n+1}\}) >0$ for all $n.$ Then, as suggested in the comments, we can define
$$f_n=\frac{1}{\mu(\{x:m_n<|x|<m_{n+1}\}}\chi_{\{x:m_n<|x|<m_{n+1}\}}.$$
Note that $\int f_n\,d\mu =1$ for all $n.$We then have your conditions met, with $f=0,$ but $f_n$ does not converge to $f$ in $L^1.$ That's a contradiciton, and therefore $m(K)=1$ for some compact $K.$
The other directions is simple to prove, so I'll leave it there.