How to Install/Uninstall Imagemagick on a cPanel/WHM Server

How to Install/Uninstall Imagemagick on a cPanel/WHM Server.

 

ERROR : -bash: /usr/bin/convert: No such file or directory

[root@server ~]# /usr/bin/convert –version
-bash: /usr/bin/convert: No such file or directory
 
checkimagemagick No such file or directory
 
Imagemagick might not installed on the above server and that is the reason why you are getting the above error. You can fix the above error by installing Imagemagick on your cPanel server. Contact you webhosting company if you don’t have root access to the server to install Imagemagick.

You can either use yum or cPanel script to install ImageMagick

1. Log into your cPanel server via SSH as root

2. You can install imagemagick on cPanel/WHM server by using the cPanel script /scripts/installimagemagick

It might take few minutes to install imagemagick using the above cPanel script
 

[root@server ~]# /scripts/installimagemagick
Extension imagick enabled in php.ini
extension imagick.so installed in /usr/local/lib/php.ini
Tidying /usr/local/cpanel/3rdparty/php/56/etc/php.ini…
No changes
Tidying /usr/local/lib/php.ini…
No changes

 

METHOD 2 :

1. Log into your cPanel server via SSH as ‘root’

2. Run the command ‘yum install imagemagick’ to install Imagemagick

Command : yum install imagemagick

After installing imagemagick run the below commands to check whether it is installed correctly.
 

[root@server2 ~]# /usr/bin/convert –version
Version: ImageMagick 6.7.8-9 2016-06-16 Q16
Copyright: Copyright (C) 1999-2012 ImageMagick Studio LLC
Features: OpenMP

 
Now ImageMagick displays the version correctly.
 


 

How to uninstall/remove imagemagick from a cPanel/WHM server

 
1. Log into your cPanel server via SSH as ‘root’

2. Run the command ‘yum remove ImageMagick’ to remove Imagemagick
 

[root@server2 ~]# yum remove ImageMagick

Removed:
ImageMagick.x86_64 0:6.7.8.9-15.el7_2

Dependency Removed:
ImageMagick-c++.x86_64 0:6.7.8.9-15.el7_2
ImageMagick-c++-devel.x86_64 0:6.7.8.9-15.el7_2
ImageMagick-devel.x86_64 0:6.7.8.9-15.el7_2
ImageMagick-perl.x86_64 0:6.7.8.9-15.el7_2

 
ImageMagick and its dependencies are removed from the server.