OS CentOS

 yum install libxml2-devel libxslt-devel libgcrypt-devel

OS Debian

 aptitude install libxslt1.1 libxslt1-dev libgcrypt11-dev libxml2 libxml2-dev

Edit config for Custombuild DirectAdmin

cd /usr/local/directadmin/custombuild
vi configure/ap2/configure.php5

Add below

--with-dom=/usr/lib \
--with-dom-exslt=/usr/lib \ 
--with-dom-xslt=/usr/lib  \
--with-xsl

or

--with-dom=/usr/local/lib
--with-dom-exslt=/usr/local/lib
--with-dom-xslt=/usr/local/lib
--with-xsl

Save and Compile Custombuild

./build clean
./build php n

Restart Apache service CentOS/Debian /etc/init.d/httpd restart

end.