From $\sum_p \frac{\log p}{p^s} = \frac{1}{s-1} + O(1)$ conclude that $\sum_p \frac{1}{p^s} = \log \frac{1}{s-1} + O(1)$ I'm reading a book on analytic number theory. It asks me to prove:

$$ \sum_p \frac{\log p}{p^s} = \frac{1}{s-1} + O(1) \tag{A}$$
  and conclude, via integration, that:
    $$ \sum_p \frac{1}{p^s} = \log \frac{1}{s-1} + O(1) \tag{B}$$

Now, I know how to prove $(A)$ via Abel Summation. However, when it comes to $(B),$ I have the problem that although:
$$\frac{d}{dx} \log(x-1) = \frac{1}{x-1}$$ and
$$\frac{d}{ds} p^{-s} = (-\log p)p^{-s}$$
I have the problem that when I integrate over $O(1)$, I get $\infty$, not $O(1)$.
What am I doing wrong? How do I get from $(A)$ to $(B)$?
 A: What if you don't integrate over all of $(s,\infty)$? Say, fix $S$ large enough, and...
$$\int_s^S\sum_{p}\frac{\log p}{p^\sigma}d\sigma=\int_s^S\frac{1}{\sigma-1}+O(1)d\sigma=\log\frac{1}{s-1}+O(1) $$
whereas
$$\int_s^S\sum_{p}\frac{\log p}{p^\sigma}d\sigma=\sum_p\int_s^S\frac{\log p}{p^\sigma}d\sigma=\sum_{p}\left(\frac{1}{p^s}-\frac{1}{p^S}\right)=\sum_p\frac{1}{p^s}~+O(1) $$
for $s<S$ as $s\to1^+$.
(Some uniform convergence stuff needs to be checked so that the interchange is justified.)
A: The first idea I had when you posted in chat was to use infinite Möbius inversion. We have
$$P(s)=\sum_p\frac{1}{p^s}=\sum_{n\ge1}\frac{\mu(n)}{n}\log\zeta(ns), $$
where $P(\cdot)$ is the prime zeta function and $\zeta(\cdot)$ is the Riemann zeta function. (For those who want to check this: write $\zeta$ in the Euler product form and then expand each Euler factor with a series expansion for $\log$ individually; group terms appropriately.) As $s\to1^+$ all of the $n\ge2$ terms are already $O(1)$ (put together), so we need only put $\zeta(s)=\frac{1}{s-1}+O(1)$ inside the first logarithm.
This route requires more work and preliminary information though.
A: Well we know that 
$$\zeta(\sigma)= \frac{1}{\sigma-1}$$ when $$ \sigma \to1^+$$ since zeta has a simple pole in $\sigma=1$ with residual one.
Now your function $$\sum_p\frac{\log p}{p^s}$$ can be expressed in terms of the zeta function. 
see http://people.math.jussieu.fr/~demarche/enseignements/2011-2012/M1-TDN/MM020-TD6-corrige.pdf (it's the exercise number 7, question g, in french :)).
The tricky part is why could you integrate two functions which are equivalent in the sense that $$\sum_p \frac{\log p}{p^s} ∼ \frac{1}{s-1}$$ ?
Here it is possible since $1/s-1$ is not integrable in a neighborhood of 1. 
Why?
here is an sketch of how you could procede. 
Let f, g be continuous on R such that f~g and $\int_0^\infty$fdx diverges.
I will write this integral I in what follows and I$x$ when the upper bound is $x$ instead of + $\infty$. 
we would like to show that I (f) ~ I (g)
In what follows we have f ~ g at infinity. (I guess you could repeat that proof for an equivalence that holds in another neighborhood) 
f ~ g then f (x) = g (x) (1 + h (x)) such that $gh \to0$ when x tends to + infinity (and h tends to $0$ as well).
So you've got  I$x$ (f) / I$x$ (g) = 1 + I$x$ (gh) / I$x$ (g)
then show that | I$x$ (gh) / I$x$ (g) | tends to $0$ in + infinity
since |I$x$ (gh) / I$x$ (g) | = I$a$ (gh) / I$x$ (g) + I$a-x$ (gh) / Ix (g)
 then  | I$x$ (gh) / I$x$ (g) | $ \leq$ I$a$(gh) / I$x$ (g) + sup (h) on [$a$, x]
and since h tends to $0$, you can choose $a$ large enough such that $sup (h) \leq \epsilon / 2$
Once $a$ is chosen, since I$a$ (gh) is a number and I$x$ (g) diverges then there exists $x$ large enough such that I$a$ (gh) / I$x$ (g) $\leq \epsilon / 2$.
Finally, for $x$ large enough everything is inferior to a certain epsilon, and you can conclude. 
