• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Input How to install ImageMagic 6.9 on Plesk Centos 7 PHP 7.4 & PHP 8.0

lazersate

New Pleskian
How to install ImageMagic 6.9 on Plesk Centos 7 PHP 7.4 & PHP 8.0

Here are final instructions on how to install ImageMagic on Centos 7 using PHP 7.4 on Plesk.

After literally trying to get it to work for now a week. I was able to put different instructions into a working solution.

I have 2 servers with Centos & Plesk, one with PHP 7.4 & one with PHP 8.0

First remove all traces of ImageMagic on your server. Here is a command that will show you
all instance of ImageMagic installed

Lets run this command:

Step #1
yum remove ImageMagick

Step #2
rpm -qa | grep -i ImageMagick

It will list per line all versions and types of ImageMagic installed, IF THE Step #1 didnt remove all instances of ImageMagick.

Remove each line of instances that showed above. This is example step of how to remove those lines or if any showed from running above command. Say my result gave me one line only and it gave me this : ImageMagick-6.9.10.68-3.el7.x86_64

Step #3
sudo yum remove ImageMagick-6.9.10.68-3.el7.x86_64

REPEAT STEP 3 till the list from STEP#2 is removed and uninstalled

Step #4
yum -y install bzip2-devel libtiff-devel giflib-devel ghostscript-devel libwmf-devel jasper-devel libtool-ltdl-devel libXext-devel libXt-devel librsvg2-devel OpenEXR-devel libwebp-devel lcms2-devel

Step #5

Step #6
sed -i '/BuildRequires:\tghostscript-devel/a BuildRequires:\tlibwebp-devel' /root/rpmbuild/SPECS/ImageMagick.spec

Step #7
sed -i '/Requires: pkgconfig/a Requires: libwebp' /root/rpmbuild/SPECS/ImageMagick.spec

Step #8
rpmbuild -ba /root/rpmbuild/SPECS/ImageMagick.spec


Now are are going to install couple commands to make sure its enabled on php side. This is 100% must otherwise it wont show. This is where I was stuck for a bit. Till found some reading on it. so please run for PHP 7.4 & PHP 8.0

NOTE****If you use both instances PHP 7.4 & PHP 8.0 then both commands can be run below.

PHP 7.4

Step #9
rpm -Uvh --force /root/rpmbuild/RPMS/x86_64/ImageMagick-6.9.10.68-3.el7.x86_64.rpm
sudo yum install plesk-php74-imagick

PHP 8.0

Step #9
sudo yum install plesk-php80-imagick

Reboot Server - ***Full Reboot***
Step #10

You should be all set if you run phpinfo. Your results should be as mine. Screenshot attached. I tried this on several servers and the results worked 100%

Hope this helps someone.

Billy Gladky
 

Attachments

  • phpinfo.png
    phpinfo.png
    119.9 KB · Views: 20
Last edited by a moderator:
Thank you for your input!
But note, we have a special section on this forum for sharing such instructions: Resources
 
Thank Igor - I would move it, but I dont see anywhere how to edit my post. I actually need to edit, as i forgot a step.
Thanks
 
***************AFTER STEP #8 ************
I forgot an important command that has to be run.

************missing AFTER STEP #8************

rpm -Uvh --force /root/rpmbuild/RPMS/x86_64/ImageMagick-6.9.10.68-3.el7.x86_64.rpm
 
I have done everything it seems to work but how do I get support for webp images?

PHP info:

imagick​

imagick moduleenabled
imagick module version3.7.0
imagick classesImagick, ImagickDraw, ImagickPixel, ImagickPixelIterator, ImagickKernel
Imagick compiled with ImageMagick versionImageMagick 6.9.10-68 Q16 x86_64 2020-04-01 ImageMagick
Imagick using ImageMagick library versionImageMagick 6.9.10-68 Q16 x86_64 2021-10-14 ImageMagick
ImageMagick copyright© 1999-2019 ImageMagick Studio LLC
ImageMagick release date2021-10-14
ImageMagick number of supported formats:236
ImageMagick supported formats3FR, 3G2, 3GP, AAI, AI, ART, ARW, AVI, AVS, BGR, BGRA, BGRO, BMP, BMP2, BMP3, BRF, CAL, CALS, CANVAS, CAPTION, CIN, CIP, CLIP, CMYK, CMYKA, CR2, CRW, CUR, CUT, DATA, DCM, DCR, DCX, DDS, DFONT, DNG, DOT, DPX, DXT1, DXT5, EPDF, EPI, EPS, EPS2, EPS3, EPSF, EPSI, EPT, EPT2, EPT3, ERF, EXR, FAX, FILE, FITS, FRACTAL, FTP, FTS, G3, G4, GIF, GIF87, GRADIENT, GRAY, GRAYA, GROUP4, GV, H, HALD, HDR, HISTOGRAM, HRZ, HTM, HTML, HTTP, HTTPS, ICB, ICO, ICON, IIQ, INFO, INLINE, IPL, ISOBRL, ISOBRL6, J2C, J2K, JNG, JNX, JP2, JPC, JPE, JPEG, JPG, JPM, JPS, JPT, JSON, K25, KDC, LABEL, M2V, M4V, MAC, MAGICK, MAP, MASK, MAT, MATTE, MEF, MIFF, MKV, MNG, MONO, MOV, MP4, MPC, MPEG, MPG, MRW, MSL, MSVG, MTV, MVG, NEF, NRW, NULL, ORF, OTB, OTF, PAL, PALM, PAM, PANGO, PATTERN, PBM, PCD, PCDS, PCL, PCT, PCX, PDB, PDF, PDFA, PEF, PES, PFA, PFB, PFM, PGM, PGX, PICON, PICT, PIX, PJPEG, PLASMA, PNG, PNG00, PNG24, PNG32, PNG48, PNG64, PNG8, PNM, PPM, PREVIEW, PS, PS2, PS3, PSB, PSD, PTIF, PWP, RADIAL-GRADIENT, RAF, RAS, RAW, RGB, RGBA, RGBO, RGF, RLA, RLE, RMF, RW2, SCR, SCT, SFW, SGI, SHTML, SIX, SIXEL, SPARSE-COLOR, SR2, SRF, STEGANO, SUN, SVG, SVGZ, TEXT, TGA, THUMBNAIL, TIFF, TIFF64, TILE, TIM, TTC, TTF, TXT, UBRL, UBRL6, UIL, UYVY, VDA, VICAR, VID, VIFF, VIPS, VST, WBMP, WMF, WMV, WMZ, WPG, X, X3F, XBM, XC, XCF, XPM, XPS, XV, XWD, YCbCr, YCbCrA, YUV
 
I have done everything it seems to work but how do I get support for webp images?

PHP info:

imagick​

imagick moduleenabled
imagick module version3.7.0
imagick classesImagick, ImagickDraw, ImagickPixel, ImagickPixelIterator, ImagickKernel
Imagick compiled with ImageMagick versionImageMagick 6.9.10-68 Q16 x86_64 2020-04-01 ImageMagick
Imagick using ImageMagick library versionImageMagick 6.9.10-68 Q16 x86_64 2021-10-14 ImageMagick
ImageMagick copyright© 1999-2019 ImageMagick Studio LLC
ImageMagick release date2021-10-14
ImageMagick number of supported formats:236
ImageMagick supported formats3FR, 3G2, 3GP, AAI, AI, ART, ARW, AVI, AVS, BGR, BGRA, BGRO, BMP, BMP2, BMP3, BRF, CAL, CALS, CANVAS, CAPTION, CIN, CIP, CLIP, CMYK, CMYKA, CR2, CRW, CUR, CUT, DATA, DCM, DCR, DCX, DDS, DFONT, DNG, DOT, DPX, DXT1, DXT5, EPDF, EPI, EPS, EPS2, EPS3, EPSF, EPSI, EPT, EPT2, EPT3, ERF, EXR, FAX, FILE, FITS, FRACTAL, FTP, FTS, G3, G4, GIF, GIF87, GRADIENT, GRAY, GRAYA, GROUP4, GV, H, HALD, HDR, HISTOGRAM, HRZ, HTM, HTML, HTTP, HTTPS, ICB, ICO, ICON, IIQ, INFO, INLINE, IPL, ISOBRL, ISOBRL6, J2C, J2K, JNG, JNX, JP2, JPC, JPE, JPEG, JPG, JPM, JPS, JPT, JSON, K25, KDC, LABEL, M2V, M4V, MAC, MAGICK, MAP, MASK, MAT, MATTE, MEF, MIFF, MKV, MNG, MONO, MOV, MP4, MPC, MPEG, MPG, MRW, MSL, MSVG, MTV, MVG, NEF, NRW, NULL, ORF, OTB, OTF, PAL, PALM, PAM, PANGO, PATTERN, PBM, PCD, PCDS, PCL, PCT, PCX, PDB, PDF, PDFA, PEF, PES, PFA, PFB, PFM, PGM, PGX, PICON, PICT, PIX, PJPEG, PLASMA, PNG, PNG00, PNG24, PNG32, PNG48, PNG64, PNG8, PNM, PPM, PREVIEW, PS, PS2, PS3, PSB, PSD, PTIF, PWP, RADIAL-GRADIENT, RAF, RAS, RAW, RGB, RGBA, RGBO, RGF, RLA, RLE, RMF, RW2, SCR, SCT, SFW, SGI, SHTML, SIX, SIXEL, SPARSE-COLOR, SR2, SRF, STEGANO, SUN, SVG, SVGZ, TEXT, TGA, THUMBNAIL, TIFF, TIFF64, TILE, TIM, TTC, TTF, TXT, UBRL, UBRL6, UIL, UYVY, VDA, VICAR, VID, VIFF, VIPS, VST, WBMP, WMF, WMV, WMZ, WPG, X, X3F, XBM, XC, XCF, XPM, XPS, XV, XWD, YCbCr, YCbCrA, YUV

I've also followed the steps, everything seemed to work, but no webp showing in the supported formats
 
After step #8 (rpmbuild -ba /root/rpmbuild/SPECS/ImageMagick.spec) I get the following output:
Code:
RPM build errors:
    File not found by glob: /root/rpmbuild/BUILDROOT/ImageMagick-6.9.10.68-3.el7.x86_64/usr/lib64/libMagick++-6*.so*

As a result, there's no rpm in the /root/rpmbuild/RPMS directory so I cannot proceed to the next steps.

Trying to investigate why libMagick++ is missing.
 
Back
Top