I've just started to learn for my ergodic theory exam and have the following question, because I can't find anything in my notes: What happens, if the space X is not compact or more specifically what would be a counter-example to the theorem in this situation?
Thank you for the help!
Compactness is a necessary assumption for the Krylov-Bogoliubov theorem.
Here is a counterexample.
Let $X=\mathbb{R}$ and $F:\mathbb{R}\to\mathbb{R}$ with $F(x)=x+1$. Suppose that $\mu$ is an $F$-invariant Borel probability measure on $\mathbb{R}$. Then invariance implies $\mu([0,1))=\mu([k,k+1))$ for all $k\in\mathbb{Z}$. By $\sigma$-additivity we get
$$1=\mu(\mathbb{R})=\mu\left(\bigcup_{k\in\mathbb{Z}} [k,k+1)\right)=\sum_{k\in\mathbb{Z}} \mu([k,k+1))=\sum_{k\in\mathbb{Z}} \mu([0,1)).$$
The RHS evaluates either to $0$ if $\mu([0,1))=0$ or to $\infty$, if $\mu([0,1))>0$. In both cases, a contradiction.