Imagick update fails

sysdev

Verified User
Joined
Jul 16, 2007
Messages
391
Anybody having issues with the latest imagick update?

Compiles without problems, but results in a:

PHP Startup: Unable to load dynamic library 'imagick.so' (tried: /usr/local/php73/lib/php/extensions/no-debug-non-zts-20180731/imagick.so (libzip.so.5: cannot open shared object file: No such file or directory), /usr/local/php73/lib/php/extensions/no-debug-non-zts-20180731/imagick.so.so (/usr/local/php73/lib/php/extensions/no-debug-non-zts-20180731/imagick.so.so: cannot open shared object file: No such file or directory))<br/>Uknown file(0)

Centos 7.9, php 7.3

The php 8 version on the same server has no problems installing imagick.

?
 
FYI: Rebuilding PHP or reinstalling libzip does not fix it so I restored the backup of the previous imagick.so to fix it.
 
Didn't notice any issues. Check:
Code:
ldd /usr/local/php73/lib/php/extensions/no-debug-non-zts-20180731/imagick.so

Try re-installing ImageMagick and imagick.
 
why it try to find .so.so file? maybe misspelling at include path?
 
Didn't notice any issues. Check:
Code:
ldd /usr/local/php73/lib/php/extensions/no-debug-non-zts-20180731/imagick.so

Try re-installing ImageMagick and imagick.
I already tried that. It seems to only fail with php 7.3. It works on 7.4 of 8.0.

# php -v
PHP Warning: PHP Startup: Unable to load dynamic library 'imagick.so' (tried: /usr/local/php73/lib/php/extensions/no-debug-non-zts-20180731/imagick.so (libzip.so.5: cannot open shared object file: No such file or directory), /usr/local/php73/lib/php/extensions/no-debug-non-zts-20180731/imagick.so.so (/usr/local/php73/lib/php/extensions/no-debug-non-zts-20180731/imagick.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP 7.3.28 (cli) (built: May 16 2021 12:21:45) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.28, Copyright (c) 1998-2018 Zend Technologies
with the ionCube PHP Loader + ionCube24 v10.4.5, Copyright (c) 2002-2020, by ionCube Ltd.
with Zend OPcache v7.3.28, Copyright (c) 1999-2018, by Zend Technologies

# ldd /usr/local/php73/lib/php/extensions/no-debug-non-zts-20180731/imagick.so
linux-vdso.so.1 => (0x00007ffe8f9a9000)
libMagickWand-7.Q16HDRI.so.9 => /usr/local/lib/libMagickWand-7.Q16HDRI.so.9 (0x00007fe0545d8000)
libMagickCore-7.Q16HDRI.so.9 => /usr/local/lib/libMagickCore-7.Q16HDRI.so.9 (0x00007fe054009000)
libc.so.6 => /lib64/libc.so.6 (0x00007fe053c3b000)
libfreetype.so.6 => /usr/local/lib/libfreetype.so.6 (0x00007fe05398e000)
libjpeg.so.9 => /usr/local/lib/libjpeg.so.9 (0x00007fe053752000)
libpng16.so.16 => /usr/local/lib/libpng16.so.16 (0x00007fe053520000)
libwebp.so.7 => /usr/local/lib/libwebp.so.7 (0x00007fe0532b2000)
libbz2.so.1 => /lib64/libbz2.so.1 (0x00007fe0530a2000)
libxml2.so.2 => /usr/local/lib/libxml2.so.2 (0x00007fe052d42000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007fe052b3e000)
libiconv.so.2 => /usr/local/lib/libiconv.so.2 (0x00007fe052840000)
libz.so.1 => /lib64/libz.so.1 (0x00007fe05262a000)
libzip.so.5 => not found <<<<<<<< !!!!!
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fe05240e000)
libgomp.so.1 => /lib64/libgomp.so.1 (0x00007fe0521e8000)
libm.so.6 => /lib64/libm.so.6 (0x00007fe051ee6000)
libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007fe051cd0000)
/lib64/ld-linux-x86-64.so.2 (0x00007fe054b4b000)
libzip.so.5 => not found <<<<<<<< !!!!!

# locate libzip.so
/usr/lib64/libzip.so
/usr/lib64/libzip.so.2
/usr/lib64/libzip.so.2.1.0
/usr/local/lib64/libzip.so
/usr/local/lib64/libzip.so.5
/usr/local/lib64/libzip.so.5.0
/usr/local/lib64/libzip.so.5.3
 
Yups, tried on 3 different servers, only happens with the 7.3 php version.

# /usr/local/php73/bin/php -i|grep imagick
PHP Warning: PHP Startup: Unable to load dynamic library 'imagick.so' (tried: /usr/local/php73/lib/php/extensions/no-debug-non-zts-20180731/imagick.so (libzip.so.5: cannot open shared object file: No such file or directory), /usr/local/php73/lib/php/extensions/no-debug-non-zts-20180731/imagick.so.so (/usr/local/php73/lib/php/extensions/no-debug-non-zts-20180731/imagick.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0

# /usr/local/php74/bin/php -i|grep imagick
imagick

# /usr/local/php80/bin/php -i|grep imagick
imagick
 
After an 'ldconfig /usr/local/lib64' it seems to work again. Might be a symbolic link that is forgotten in the install.

ln -s /usr/local/lib64/libzip.so.5.3 /usr/lib64/libzip.so.5 fixes it in my case.

Extra: In CentOS 6 i had to remove the libjpeg.so.62 versions, manually extract the ImageMagick-7.0.11-12.tar.gz and ./configure, make, make install the stuff, then ./build imagick to get it updated.
 
Last edited:
After an 'ldconfig /usr/local/lib64' it seems to work again. Might be a symbolic link that is forgotten in the install.

ln -s /usr/local/lib64/libzip.so.5.3 /usr/lib64/libzip.so.5 fixes it in my case.

Extra: In CentOS 6 i had to remove the libjpeg.so.62 versions, manually extract the ImageMagick-7.0.11-12.tar.gz and ./configure, make, make install the stuff, then ./build imagick to get it updated.


CentOS 7 with latest directadmin.
the symlink was created without manual input after installation of the latest
libxslt & libzip

Can confirm ldconfig resolved the issue for PHP.




Bash:
[root@mouse lib64]# ldd /usr/local/php73/lib/php/extensions/no-debug-non-zts-20180731/imagick.so
        linux-vdso.so.1 =>  (0x00007fff6cbbd000)
        libMagickWand-7.Q16HDRI.so.10 => /usr/local/lib/libMagickWand-7.Q16HDRI.so.10 (0x00007f4d01239000)
        libMagickCore-7.Q16HDRI.so.10 => /usr/local/lib/libMagickCore-7.Q16HDRI.so.10 (0x00007f4d00ba8000)
        libc.so.6 => /lib64/libc.so.6 (0x00007f4d007da000)
        libtiff.so.5 => /usr/local/lib/libtiff.so.5 (0x00007f4d00564000)
        libfreetype.so.6 => /usr/local/lib/libfreetype.so.6 (0x00007f4d002b7000)
        libjpeg.so.9 => /usr/local/lib/libjpeg.so.9 (0x00007f4d0007b000)
        libpng16.so.16 => /usr/local/lib/libpng16.so.16 (0x00007f4cffe49000)
        libwebp.so.7 => /usr/local/lib/libwebp.so.7 (0x00007f4cffbdb000)
        libXext.so.6 => /lib64/libXext.so.6 (0x00007f4cff9c9000)
        libXt.so.6 => /lib64/libXt.so.6 (0x00007f4cff762000)
        libbz2.so.1 => /lib64/libbz2.so.1 (0x00007f4cff552000)
        libxml2.so.2 => /usr/local/lib/libxml2.so.2 (0x00007f4cff1f2000)
        libdl.so.2 => /lib64/libdl.so.2 (0x00007f4cfefee000)
        libiconv.so.2 => /usr/local/lib/libiconv.so.2 (0x00007f4cfecf0000)
        libz.so.1 => /lib64/libz.so.1 (0x00007f4cfeada000)
        libzip.so.5 => not found
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f4cfe8be000)
        libSM.so.6 => /lib64/libSM.so.6 (0x00007f4cfe6b6000)
        libICE.so.6 => /lib64/libICE.so.6 (0x00007f4cfe49a000)
        libX11.so.6 => /lib64/libX11.so.6 (0x00007f4cfe15c000)
        libgomp.so.1 => /lib64/libgomp.so.1 (0x00007f4cfdf36000)
        libm.so.6 => /lib64/libm.so.6 (0x00007f4cfdc34000)
        libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f4cfda1e000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f4d017d9000)
        libzip.so.5 => not found
        libuuid.so.1 => /lib64/libuuid.so.1 (0x00007f4cfd819000)
        libxcb.so.1 => /lib64/libxcb.so.1 (0x00007f4cfd5f1000)
        libXau.so.6 => /lib64/libXau.so.6 (0x00007f4cfd3ed000)


I run

Code:
[root@mouse lib64]# ldconfig /usr/local/lib64/



now it works
Code:
[root@mouse lib64]# ldd /usr/local/php73/lib/php/extensions/no-debug-non-zts-20180731/imagick.so |grep libzip
        libzip.so.5 => /usr/local/lib64/libzip.so.5 (0x00007f32a912b000)
[root@mouse lib64]#



* edit

can confirm this on another server.
centos 7 latest DA.

Bash:
[root@royal ~]# ldd /usr/local/php73/lib/php/extensions/no-debug-non-zts-2018073                                                                                              1/imagick.so|grep libzip
        libzip.so.5 => not found
        libzip.so.5 => not found
[root@royal ~]# ldconfig /usr/local/lib64/
[root@royal ~]# ldd /usr/local/php73/lib/php/extensions/no-debug-non-zts-2018073                                                                                              1/imagick.so|grep libzip
        libzip.so.5 => /usr/local/lib64/libzip.so.5 (0x00007f5d4893b000)
[root@royal ~]#
 
Last edited:
Adding /usr/local/lib64 to /etc/ld.so.conf then running ldconfig[/code] should solve this too :)
 
I think the installer should check this value and add it at the end of the install process.

I can confirm it's missing from a minimal centos 7 install on my machines.

Code:
[root@royal ~]# cat /etc/ld.so.conf
include ld.so.conf.d/*.conf
/usr/local/lib
[root@royal ~]#
 
Back
Top