If $G$ is a compact Lie group whose Lie algebra $g$ has a trivial center, please show that the fundamental group of $G$ is finite.
Since @the beatles link doesn't seem to work, I will try to answer, using references to results on compact Lie groups -
We can assume that $G$ is connected (since the fundamental group only sees a given connected component).
It is known that a compact Lie group $G$ is reductive, and so its lie algebra $\mathfrak g$ is of the form $\mathfrak g = \mathfrak z \oplus \mathfrak s$ where $\mathfrak z$ is central and $\mathfrak s$ is semi-simple.
$\mathfrak z$ is the Lie algebra of $Z(G^o)$, and so since the given group $G$ has trivial center it is in fact semi-simple. Finally, it is a theorem of Weyl that a semi-simple compact Lie group has finite fundamental group.
For the above results on compact Lie groups see e.g. chapter IV in Knapp's book Lie groups - beyond an introduction.
Here is a geometric proof of this fact. First, notice that $G$ admits a bi-invariant Riemannian metric, i.e., a metric invariant under both left and right multiplication. One then computes the Ricci curvature of this metric and concludes that it is strictly positive. Lastly, you use Myers's theorem which states that a manifold of strictly positive Ricci curvature is compact. By looking at the universal cover, this implies that $\pi_1$ of such manifold has to be finite. You can find all this for instance in Do Carmo's book "Riemannian Geometry".