Suppose that $f(x) \in \mathbb Z[x]$ factors in linears over all $\mathbb F_p$ except for a finite number. How can I use the fact that $\lim_{s \to 1} (s-1)\zeta_K(s) \neq 0$ for any finite extension $K:\mathbb Q$ to prove that $f(x)$ factors in linears over $\mathbb Q[x]$? Here, zeta function is $\zeta_K(s):=\prod (1-\frac{1}{N(p)^s})^{-1}$ for all prime ideals $p$ in integers ring $\mathcal O_K$.
My idea is to take $K$ to be a splitting field of $f(x)$ and to prove that $K=\mathbb Q$. Unfortunately, I do not understand a connection between integers ring and $f(x)$: neither $\mathcal O_K \neq \mathbb Z[x]/f(x)$, nor I see why a ramification of ideals in $\mathcal O_K$ is connected with $\zeta_K(s)$. Could you tell me a right direction or a hint?