Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Gabotronix's avatar

PHP Imagick module : imagick module is not available with this php installation in ubuntu

I'm trying to install php-imagick to use with laravel intervention image package as its driver, I tried to install it via sudo apt-install php-imagick

Reading package lists... Done
Building dependency tree
Reading state information... Done
php-imagick is already the newest version (3.4.3~rc2-2ubuntu4.1).
0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.

I added extension=imagick.so to my php.ini file and tried restarting the php service with:

sudo service php7.3-fpm restart

But still getting the same message:

When I do php -m to see installed modules I get this error message:

PHP Warning:  PHP Startup: Unable to load dynamic library 'imagick.so' (tried: /usr/lib/php/20180731/imagick.so (/usr/lib/php/20180731/imagick.so: cannot open shared object file: No such file or directory), /usr/lib/php/20180731/imagick.so.so (/usr/lib/php/20180731/imagick.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0

And when I do convert --version I get this message:

Version: ImageMagick 6.9.7-4 Q16 x86_64 20170114 http://www.imagemagick.org
Copyright: © 1999-2017 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Features: Cipher DPC Modules OpenMP
Delegates (built-in): bzlib djvu fftw fontconfig freetype jbig jng jpeg lcms lqr ltdl lzma openexr pangocairo png tiff wmf x xml zlib
0 likes
0 replies

Please or to participate in this conversation.