Unable to install imagick extension for php7.4

Hi,
My server is:
X86_64 architecture
Rocky Linux 8 (Compatible with RHEL 8, Alma Linux 8 etc…)

I am trying to install the imagick extension for php. I try doing it from cyberpanel gui:
Server > PHP > Install Extensions > Select PHP 7.4 > lsphp74-pecl-imagick.x86_64 INSTALL
The following is the result:

Last metadata expiration check: 2:59:18 ago on Fri Jul 29 05:59:05 2022.
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)
PHP Extension Installed.

Even though it spits out Extension installed, I know it isn’t. So I try doing it via the normal terminal way:

[root@sriv ~]# dnf install lsphp74-pecl-imagick.x86_64
Last metadata expiration check: 3:01:05 ago on Fri 29 Jul 2022 05:59:05 AM UTC.
Error: 
 Problem: cannot install the best candidate for the job
  - nothing provides libMagickCore-6.Q16.so.6()(64bit) needed by lsphp74-pecl-imagick-3.4.4-3.el8.7.4.x86_64
  - nothing provides libMagickWand-6.Q16.so.6()(64bit) needed by lsphp74-pecl-imagick-3.4.4-3.el8.7.4.x86_64
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)

If someone can guide me through this, perhaps I need to add another repo or something. I will be very thankful.

Just bumping the post

right, I don’t think you’ll ever see those version of imagemagick library in any repo… gotta install through pecl :

dnf install ImageMagick-devel
/usr/local/lsws/lsphp74/bin/pecl install imagick

then enable the extension :

nano /usr/local/lsws/lsphp74/etc/php.ini

add

extension=imagick.so

restart lsws ( service lshttpd restart )

edit, forgot that when I did it on rocky linux, the lib had the wrong permission

chmod 755 /usr/local/lsws/lsphp74/lib64/php/modules/imagick.so

thank you very much mate.

This topic was automatically closed 3 hours after the last reply. New replies are no longer allowed.