For building you need:
Install them (in this order) according to their README's. Don't forget the dependencies of the libs itself.