Introduction
You may encounter an issue where the PHP expect module will not install properly in PHP via the Module Installer system using PECL. Below explains what is missing and how to correct it.
Procedure
The following yum packages must be installed otherwise you will receive errors on compile
yum install expect expect-devel expectk tcl tcl-devel tk tk-devel
Once they are installed, you should be able to go to
WHM > Software > Module Installers > PHP Pecl
and install the expect module for any PHP version that you require.