cPanelResources

Tutorial How to Install ImageMagick for EA-PHP and ALT-PHP

cPanelResources

Staff
Staff member
Apr 27, 2015
112
83
153
Houston, TX
cPanel Access Level
DataCenter Provider
cPanelResources submitted a new resource:

How to Install ImageMagick for EA-PHP and ALT-PHP - Installing ImageMagick on cPanel & WHM.

Warnings
• We recommend that only experienced system administrators perform these steps. SSH access and root-level privileges are required to execute the commands included in this tutorial.
• cPanel Technical Support does not provide assistance with the steps in this tutorial beyond confirming that ImageMagick is installed and working with a basic test PHP script such as the one included in this resource.
What is ImageMagick?
ImageMagick is...
Read more about this resource...
 

Damian

Well-Known Member
Oct 1, 2001
115
9
318
I see that the version of ImageMagick and ghostscript changed at the same time this resource was published.

As of this version automatic creation of PDF thumbnails stopped working in WordPress and this is the only thing I can see in the update logs that looks relevant. The yum.log shows the update to this and ImageMagick-devel. WordPress uses these along with Ghostscript. Not sure if it's a version problem or possible a change to how it is installed and linked with Ghostscript.

A roll back using yum history didn't help. But I am also unsure what specific version of each (and dependencies) are needed.
 
Last edited:

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
Hello @Damian,

Can you confirm which operating system is installed on the server affected by this issue? You can execute the following command via SSH as a user with root privileges to find this information:

whmapi1 installed_versions packages=0|grep operating_system

Thank you.
 

Damian

Well-Known Member
Oct 1, 2001
115
9
318
Hi Michael,

operating_system_name: cloudlinux operating_system_version: '7.7'
 

Damian

Well-Known Member
Oct 1, 2001
115
9
318
Thanks Michael, that version of iproute is already installed (iproute-4.11.0-25.el7.cloudlinux.1.x86_64). Not sure how that package would impact the issue though.

With some assistance from another person I was able to successfully downgrade Imagemagick and ghostscript, reload cagefs and get it all working again. I updated the cPanel support ticket with what was done as the ticket had been handed over to CloudLinux support.
 

garconcn

Well-Known Member
Oct 29, 2009
172
18
68
Got following error when run 1st command "yum install ImageMagick ImageMagick-devel". I didn't install anything else beside basic centos 7 + cpanel

Code:
Transaction check error:
  file /usr/lib64/libgs.so.9 from install of libgs-9.25-2.el7_7.2.x86_64 conflicts with file from package ghostscript-9.07-31.el7_6.11.x86_64
  file /usr/lib64/libijs-0.35.so from install of libgs-9.25-2.el7_7.2.x86_64 conflicts with file from package ghostscript-9.07-31.el7_6.11.x86_64
 

besciualex

Registered
Nov 21, 2019
1
1
3
Romania
cPanel Access Level
Root Administrator
Please update and add step 7, after the following text.

Code:
Alternatively, you can use WHM to do the installation with the following steps:
    1. Login to WHM as the root user
    2. Navigate to: Home »Software »Module Installers
    3. Click on the Manage link to the right of "PHP Pecl"
    4. Select the version of PHP from the drop-down and click Apply
    5. Under "Install a PHP Pecl" enter "imagick" (without the quotes)
    6. Click "Install Now"
7. Restart php-fpm service. (without this step, the imagemagick is installed, but not loaded). I lost 5 minutes to figure it out. :)
 
  • Like
Reactions: Moises Perez