19

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

Anuj TBE
  • 9,198
  • 27
  • 136
  • 285

5 Answers5

44

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

elquimista
  • 2,181
  • 2
  • 23
  • 32
  • 2
    I guess this is what question poster tried to run, but according to his original question post, he made a typo (`user` instead of `usr`) – elquimista Jun 03 '19 at 19:49
5

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

SuperStormer
  • 4,997
  • 5
  • 25
  • 35
David Baldock
  • 51
  • 1
  • 2
3

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
1

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
Mark Setchell
  • 191,897
  • 31
  • 273
  • 432
0

What worked for me:

Uninstall native version (if you have installed from tar.gz)

cd ImageMagick-7.1.0-19/
sudo make uninstall

Remove apt version

sudo apt remove imagemagick
sudo apt purge imagemagick

Do simple install

sudo apt install imagemagick
John Tribe
  • 1,407
  • 14
  • 26