Let $X$ be a locally compact Hausdorff space such that $C_c(X),$ the space of all continuous functions with compact support is complete. Show that $X$ is compact.
My attempt:
I have shown that $C_c(X)$ is dense in $C_0(X),$ the space of all continuous functions vanishing at infinity. Since $C_c(X)$ is complete, therefore $$C_c(X)=C_0(X).$$
Now to conclude that $X$ is compact, it suffices to find a function in $C_0(X)$ which vanishes nowhere on $X.$ Is this always possible?
This is false. Maybe true under extra assumptions: Metrizable, $\sigma$-compact, whatever? Also I bet it's not hard to show that $C_c(X)$ complete does imply that $X$ is sequentially compact (and/or various other "countable compactness" conditions.)
Let $X=\omega_1$ (the set of countable ordinals), with the order topology. Then $X$ is locally compact but not compact. A standard argument shows that $C_c(X)=C_0(X)$, hence $C_c(X)$ is complete.
Standard argument: Say $f\in C_0(X)$. Then $\{|f|\ge1/n\}$ is compact, hence bounded: There exists $\alpha_n\in\omega_1$ such that $$|f(x)|<1/n\quad(\alpha_n<x\in\omega_1).$$There exists $\alpha\in\omega_1$ with $\alpha>\alpha_n$ for every $n$. Hence $f$ is supported on $[0,\alpha]$, so $f\in C_c(X)$.