How to add an ImageMagick installation to your path on Ubuntu

I was on a roller coaster trying to get ImageMagick to work on my Ubuntu host. I Whenever I try to load an image, I get the following error: /tmp/stream.1170.0 is not recognized by the ident command.

If I type 'which ident', I get: / usr / local / bin / ident

If I run '/ usr / local / bin / ident' or just 'identify', I get the following error: / usr / local / bin / ident: error loading shared libraries: libMagickCore.so.3: can not open shared file objects: no such file or directory

If I run '/ usr / bin / ident', ImageMagick will work fine. How can I set my path to where, when Paperclip runs the authentication command, it points to / usr / bin / ident? Thanks.

ps I tried to add this to paperclip.rb: Paperclip.options [: command_path] = '/ usr / bin' and Paperclip.options [: command_path] = '/ usr / local / bin'

+4
source share
4 answers

Add LD_LIBRARY_PATH = / usr / local / lib to your environment.

In addition, you can install ImageMagick from the repositories, it should work out of the box:

sudo apt-get install imagemagick 
+9
source

I installed it as follows (on Ubuntu 12.04 LTS):

 $ sudo apt-get install imagemagick libmagickwand-dev 

This installs ImageMagick on your computer.

Now you can check its version as follows:

 $ convert -version 

Installation directory: / usr / bin (here you can find the "convert" tool)

 $ which convert 

/ Usr / bin / convert

+3
source

To get rid of this error, I performed ldconfig / usr / local / lib

+1
source

I prefer to use aptitude:

 sudo aptitude update sudo aptitude install imagemagick 

and you are fine.

0
source

Source: https://habr.com/ru/post/1304085/


All Articles