Hello everyone,
I'm studying Weinberg's 'Gravitation and Cosmology'. In particular, in the 'Curvature' chapter it says that the Riemann tensor cannot depend on ##g_{\mu\nu}## and its first derivatives only since:

What I don't understand is how introducing the second derivatives should change this situation. The point is that (and I'm not sure about that...) we can always find a locally inertial frame. In this frame ##g_{\mu\nu}=\eta_{\mu\nu}##, which is constant, and hence all its derivatives should vanish.
What am I doing wrong?

The wrong part of your reasoning is that only if spacetime is flat, you can find a coordinate system in which [itex] g_{\mu\nu}=\eta_{\mu\nu} [/itex] globally. In a curved spacetime, its only that there is always a coordinate system that at a given point P, [itex] g_{\mu \nu}(x_p)=\eta_{\mu \nu} [/itex]. The first derivatives at P can be made to vanish too but not the second derivatives.

You left out a key qualifier: in the local inertial frame, ##g_{\mu \nu} = \eta_{\mu \nu}## at a single point (the origin of the frame). At other points, ##g_{\mu \nu} \neq \eta_{\mu \nu}##.

If you ever get confused on this again, just think about the function ##f(x)=x^2##. The first derivative of this function ##f'(x)=2x## vanishes at ##x=0## but the second derivative ##f''(x)=2## does not. The first derivative measures a slope, while the second derivative measures concavity - which is roughly analogous to curvature.