There are two main requirements for building PHP with PHP-FPM: the libevent and libxml development libraries. If these are not already installed on your system, you will need to install them with your system's package manager.
For Red Hat-based systems and other systems using yum as the package manager:
[root@local ~]# yum install libevent-devel libxml2-devel
For Ubuntu, Debian, and other systems that use apt-get or aptitude:
[root@local ~]# aptitude install libxml2-dev libevent-dev