  We compute the conformal anomaly of a nonabelian M5 brane on $S^1_q\times
H^5$ in the large $N$ limit by using the gravity dual of a black hole. We also
obtain a general formula for this conformal anomaly for any gauge group by
combining various results already present in the literature. From the conformal
anomaly we extract the Casimir energy on $\mathbb{R} \times S^5$. We find
agreement with the proposal in arXiv:1507.08553.
