For field coefficients (say in characteristic zero), we can look at cohomology. A simply-connected compact Lie group has the homotopy type of its semisimple factor,so you can reduce to the semisimple case. Now we can pass to Lie algebra cohomology and use the second Whitehead lemma stating that $H^2(\mathfrak g,\mathrm{Ad})=0$.
Claudio Gorodski
- 4.7k
- 1
- 28
- 44