What are the errors?

What OS have you got on the RPi? (I'm assuming debian...but...you never know).

At a guess you're probably missing the kernel headers or something, but without seeing the errors it's pretty difficult to know.