I learned about Tate cohomology that for finite group $G$ and $G$-module $A$, if $\hat{H}^0(H,A)=\hat{H}^1(H,A)=0$ for any subgroup $H \subset G$, then $\hat{H}^k(G,A)=0$ for all $k$.
Is there similar statement for topological space? For example, does it hold for topological space $X$, if $H^0(Y,\mathbb{Z})=\mathbb{Z}, H^1(Y,\mathbb{Z})=0$ for any open $Y \subset X$, then $H^k(X,\mathbb{Z})=0$ for $k \geq 2$?