Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

error while loading shared libraries: libMagickCore-7.Q16HDRI.so.6

I have been trying to install ImageMagick in Ubuntu 16.04 to use with movie.py

I have installed ImageMagick 7 but when I check the version from the command line

convert --version

It gives error as

convert: error while loading shared libraries: libMagickCore-7.Q16HDRI.so.6: cannot open shared object file: No such file or directory

I also tried running

sudo ldconfig /user/local/lib

But, still getting same error.

Edit 2: How I installed

  1. Downloaded two rpm files from imagemagick.org
  2. run following commands to install in Ubuntu 16.04

    sudo alien -i ImageMagick-libs-7.0.7-37.x86_64.rpm
    sudo alien -i ImageMagick-7.0.7-37.x86_64.rpm

like image 347
Anuj TBE Avatar asked May 30 '18 10:05

Anuj TBE


4 Answers

You may need to run this: ldconfig /usr/local/lib

like image 130
elquimista Avatar answered Nov 15 '22 09:11

elquimista


Found that the LD_LIBRARY_PATH variable isn't being created by the installation of ImageMagick, so when I created it manually (on Linux Mint 19) -

LD_LIBRARY_PATH=/usr/local/lib

export LD_LIBRARY_PATH

Then the ImageMagick commands work, without generating the error message - convert: error while loading shared libraries: libMagickCore-7.Q16HDRI.so.6: cannot open shared object file: No such file or directory

like image 4
David Baldock Avatar answered Nov 15 '22 09:11

David Baldock


I also encountered this error when attempting to install ImageMagick 7.0.10 on Ubuntu 20.04 (using WSL on Windows 10).

Running this fixed my problem:

sudo ldconfig /usr/lib64

I found this folder by examining the deb:

dpkg -c imagemagick-libs_7.0.10-57_amd64.deb | grep libMagickCore-7.Q16HDRI.so.8

This showed:

lrwxrwxrwx root/root         0 2021-01-09 09:59 ./usr/lib64/libMagickCore-7.Q16HDRI.so.8 -> libMagickCore-7.Q16HDRI.so.8.0.0
like image 2
Allan Shoup Avatar answered Nov 15 '22 08:11

Allan Shoup


I would suggest you find where the missing library is located:

sudo find /usr /opt / -type f -name libMagickCore-7.Q16HDRI.so.6

Then check your ldconfig settings match in:

/etc/ld.so.conf
like image 1
Mark Setchell Avatar answered Nov 15 '22 10:11

Mark Setchell