  Consider a domain $\varOmega$ in $\mathbb{C}^n$ with $n\geqslant 2$ and a
compact subset $K\subset\varOmega$ such that $\varOmega\backslash K$ is
connected. We address the problem whether a holomorphic line bundle defined on
$\varOmega\backslash K$ extends to $\varOmega$. In 2013, Forn\ae ss, Sibony and
Wold gave a positive answer in dimension $n\geqslant 3$, when $\varOmega$ is
pseudoconvex and $K$ is a sublevel set of a strongly plurisubharmonic
exhaustion function. However, for $K$ of general shape, we construct
counterexamples in any dimension $n\geqslant 2$. The key is a certain gluing
lemma by means of which we extend any two holomorphic line bundles which are
isomorphic on the intersection of their base spaces.
