In my case I am using EasyApache 4 and PHP 5.6 and was unable to install imagick.
# tail /home/domainname/public_html/error_log
PHP Warning: PHP Startup: imagick: Unable to initialize module
Module compiled with module API=20121212
PHP compiled with module API=20131226
These options need to match
in Unknown on line 0
pecl install imagick
was giving error for php-devel module and phpize
Can't find PHP headers in /opt/cpanel/ea-php56/root/usr/include/php
Ran "yum install ea-php56-php-devel" and managed to install the php-devel successfully (Make sure install relevant php devel)
Ran "pecl install imagick" successfully
All good.
# tail /home/domainname/public_html/error_log
PHP Warning: PHP Startup: imagick: Unable to initialize module
Module compiled with module API=20121212
PHP compiled with module API=20131226
These options need to match
in Unknown on line 0
pecl install imagick
was giving error for php-devel module and phpize
Can't find PHP headers in /opt/cpanel/ea-php56/root/usr/include/php
Ran "yum install ea-php56-php-devel" and managed to install the php-devel successfully (Make sure install relevant php devel)
Ran "pecl install imagick" successfully
All good.