I well know that another question with the same statement has already been published, but I want to ask somethings else.
In particular, here Background for Lie Algebra cohomology and de Rham cohomology of compact Lie Groups explain how to prove that the cohomology of left invariant form on a compact and connected Lie group $G$ is isomorphic to the De Rham cohomology on its. So if we denote by $\mathfrak{g}$ the Lie algebra of $G$, by the isomorphism between the complex of left invariant forms and the exterior algebra on $\mathfrak{g}$, we can study the cohomology of $G$ using $\mathfrak{g}$. I would understand last statement, how to pass the problem to the Lie algebra.
My principal goal is prove the characterization of compact and connected semisimple Lie groups by the first De Rham cohomology group. On Weibel the Corollary 7.8.6 solves the problem if we use the Lie algebra cohomology. Why this is isomorphic to De Rham?
Maybe I don't understand well the construction of Lie algebra cohomology. If we consider the Lie algebra $\mathfrak{g}$ of $G$, $M$ a $\mathfrak{g}$-module and the left exact functor $-^\mathfrak{g}$ that sends $M$ in $M^\mathfrak{g}=\{m\in M: xm=0\quad \forall x\in \mathfrak{g}\}$, we can define the cohomology $H^n(\mathfrak{g}, M)$ as the right derived functor of $-^\mathfrak{g}$. So it seems that it depends to $M$ and not only depends to Lie algebra or $G$. What I am wrong? How this cohomology can be isomorphic to the exterior algebra on $\mathfrak{g}$?
Thanks all for answer or any consideration.