Installing Imagick Failing on Alma Linux
Trying to install imagick on my Alma Linux server but am having some issues.
Started by installing # dnf -y install ImageMagick-devel which worked:
Installed: ImageMagick-devel-6.9.12.93-1.el8.x86_64 Complete!
Then tried to install for php version 7.4, 8.0, 8.1 and 8.2 using:
# printf "\n" | /opt/cpanel/ea-php82/root/usr/bin/pecl install imagick
I changed the php version each time I ran the command which worked for my default version 8.2,
Build process completed successfully
Installing '/opt/cpanel/ea-php82/root/usr/lib64/php/modules/imagick.so'
Installing '/opt/cpanel/ea-php82/root/usr/include/php/ext/imagick/php_imagick_shared.h'
install ok: channel://pecl.php.net/imagick-3.7.0
Extension imagick enabled in php.ini
but it kept failing for all other versions with the following explanation:
# printf "\n" | /opt/cpanel/ea-php81/root/usr/bin/pecl install imagick
WARNING: channel "pecl.php.net" has updated its protocols, use "pecl channel-update pecl.php.net" to update
downloading imagick-3.7.0.tgz ...
Starting to download imagick-3.7.0.tgz (360,138 bytes)
.........................................................................done: 360,138 bytes
33 source files, building
running: phpize
Is it not possible to install imagick for all versions of php? Or is my command wrong even though it seems to work for version 8.2? Also what is meant by use pecl channel update?
Also tried following the tutorial here.
AlmaLinux v8.9.0 STANDARD
cPanel Version 116.0.11
Apache Version 2.4.58
MySQL Version 8.0.36
Php Version 8.2
Architecture x86_64
Kernel Version 4.18.0-477.27.2.el8_8.x86_64
Thanks for your support.
UPDATE: Just tried to confirm installation on php version 8.2 with the following:
# php -i | grep -i 'ImageMagick version'
And it seems that it never installed correctly either as it just returned me to the root line with no info.
-
Background
There's multiple versions of PHP installed - usually one for the use of WHM/cPanel itself (for things like WP-Toolkit and Roundcube) and then the EasyApache installations for use by clients website.
As users could use multiple PHP versions, /usr/bin/php and /usr/local/bin/php are NOT "real PHP binaries" - but rather cPanel provided ones which map to the specific users PHP installation (see https://docs.cpanel.net/ea4/php/easyapache4-and-the-ea-php-cli-package/ ).
The cPanel version of PHP is at /usr/local/cpanel/3rdparty/bin/php (currently 8.1.27) which the relevant user ones are in /opt/cpanel/ea-php83/root/usr/bin/php , /opt/cpanel/ea-php82/root/usr/bin/php etc etc.
Background - PECL warning
The "WARNING: channel "pecl.php.net" has updated its protocols,..." message is just a warning and will not stop or fail the installation of PHP modules on its own - however, it is advisable to run:
/opt/cpanel/ea-php82/root/usr/bin/pecl channel-update pecl.php.net
(for EasyApache PHP 8.2) whenever you can just to ensure things are up to date.
Checking installation
To confirm installation of ImagieMagick on PHP 8.2 as root, you should be using:
/opt/cpanel/ea-php82/root/usr/bin/php -i | grep -i 'ImageMagick version'
which on my server returns "Imagick compiled with ImageMagick version => ImageMagick 6.9.12-93 Q16 x86_64 17898 https://legacy.imagemagick.org" and I followed the steps in https://support.cpanel.net/hc/en-us/articles/360037048673-How-to-Install-ImageMagick-for-EA-PHP for my AlmaLinux 8.9 server.
Have you, once you installed the ImageMagick packages, gone through WHM->Software->Module Installers->PHP Perl and for each version then installed "imagick". Once done, did you then try restarting PHP FPM (if used)?
( btw cPRex , the package /var/cpanel/ea4/ea_php_cli.pm references https://go.cpanel.net/ea-php-cli which 404s - could you arrange to update the "go" link to https://docs.cpanel.net/ea4/php/easyapache4-and-the-ea-php-cli-package/ ?)
0 -
I'll let the team know about the go link!
0 -
Any news related to this problem?
0 -
Catalin - what problem are you seeing at this time?
0
Please sign in to leave a comment.
Comments
4 comments