Given a schema $X/k$ with $H^0(X,\mathcal{O}_X^\times) = k^\times$ and an effective Cartier divisor $D \geq 0$ such that $\mathcal{O}(D) = O_X$, why is necessarily $D = 0$?
I tried to apply the long exact cohomology sequence to $1 \to \mathcal{O}_X^\times \to \mathcal{M}_X^\times \to \mathcal{M}_X^\times/\mathcal{O}_X^\times \to 1$, but without success.