2

My convert command doesn't work. If I run the command:

convert -resize 448x448^ srcimg.png dstimg.png

I get the following error:

convert: error while loading shared libraries: liblzma.so.0: cannot open shared object file: No such file or directory

If I try to locate the file liblzma.so.0 I don't get any result. Instead this is the output of locate liblzma.so:

/home/ep15/anaconda2/envs/tensorflow/lib/liblzma.so
/home/ep15/anaconda2/envs/tensorflow/lib/liblzma.so.5
/home/ep15/anaconda2/envs/tensorflow/lib/liblzma.so.5.2.2
/home/ep15/anaconda2/lib/liblzma.so
/home/ep15/anaconda2/lib/liblzma.so.5
/home/ep15/anaconda2/lib/liblzma.so.5.0.5
/home/ep15/anaconda2/pkgs/xz-5.0.5-1/lib/liblzma.so
/home/ep15/anaconda2/pkgs/xz-5.0.5-1/lib/liblzma.so.5
/home/ep15/anaconda2/pkgs/xz-5.0.5-1/lib/liblzma.so.5.0.5
/home/ep15/anaconda2/pkgs/xz-5.2.2-0/lib/liblzma.so
/home/ep15/anaconda2/pkgs/xz-5.2.2-0/lib/liblzma.so.5
/home/ep15/anaconda2/pkgs/xz-5.2.2-0/lib/liblzma.so.5.2.2
/lib/i386-linux-gnu/liblzma.so.5
/lib/i386-linux-gnu/liblzma.so.5.0.0
/lib/x86_64-linux-gnu/liblzma.so.5
/lib/x86_64-linux-gnu/liblzma.so.5.0.0
/usr/lib/x86_64-linux-gnu/liblzma.so
/usr/local/anaconda2/lib/liblzma.so
/usr/local/anaconda2/lib/liblzma.so.5
/usr/local/anaconda2/lib/liblzma.so.5.0.5
/usr/local/anaconda2/pkgs/xz-5.0.5-1/lib/liblzma.so
/usr/local/anaconda2/pkgs/xz-5.0.5-1/lib/liblzma.so.5
/usr/local/anaconda2/pkgs/xz-5.0.5-1/lib/liblzma.so.5.0.5

I tried to solve with a symbolic link but then another error comes out. What could be the problem?

edit: the output after I made the symbolic link 'sudo ln -svf /usr/local/anaconda2/lib/liblzma.so liblzma.so.0':

convert: error while loading shared libraries: libgvc.so.5: cannot open shared object file: No such file or directory
emapesce
  • 121
  • Perhaps try $ sudo apt-get install --reinstall imagemagick ? – kevlarjacket May 03 '17 at 14:16
  • What exactly is this "another error"? I would try the symbolic link solution as well. – Jos May 03 '17 at 14:41
  • Imagemagick in the Ubuntu repositories (12.04 and newer) uses liblzma5, not liblzma(0). You seem to be using an ancient or non-Ubuntu version of imagemagick. We can't help you with those beyond suggesting that you migrate to a supported version. – user535733 May 03 '17 at 15:18
  • I tried sudo apt-get install --reinstall imagemagick , but didn't solve the problem – emapesce May 03 '17 at 17:19
  • Do you have a different (older) version of convert installed manually? Try whereis convert or which convert – ridgy May 03 '17 at 18:20
  • which convert output: /home/myname/anaconda2/bin/convert

    whereis convert output: /usr/bin/convert /usr/bin/convert.im6 /usr/bin/X11/convert /usr/bin/X11/convert.im6 /usr/share/man/man1/convert.1.gz

    – emapesce May 04 '17 at 08:50

0 Answers0