Josh
Josh

Reputation: 3611

How to add the ImageMagick install to my path on Ubuntu

I have had been on a roller coaster trying to get ImageMagick to work on my Ubuntu slice. I Whenever I try to upload an image I get the following error: /tmp/stream.1170.0 is not recognized by the 'identify' command.

If I type 'which identify' I get: /usr/local/bin/identify

If I run '/usr/local/bin/identify' or just 'identify', I get the following error: /usr/local/bin/identify: error while loading shared libraries: libMagickCore.so.3: cannot open shared object file: No such file or directory

If I run '/usr/bin/identify', ImageMagick is run just fine. How can I set my path to where when Paperclip runs the identify command, it points to /usr/bin/identify? Thanks.

p.s. I have tried adding this to paperclip.rb: Paperclip.options[:command_path] = '/usr/bin' and Paperclip.options[:command_path] = '/usr/local/bin'

Upvotes: 5

Views: 25178

Answers (6)

Shiva
Shiva

Reputation: 12582

You can also install it using Software Manager

/home/john/Desktop/Screenshot from 2020-05-30 16-43-33.png

Upvotes: 0

SuperNova
SuperNova

Reputation: 27486

Please follow the below steps otherwise.

$ sudo apt update 
$ sudo apt-get install build-essential

$ wget https://www.imagemagick.org/download/ImageMagick.tar.gz
$ tar xvzf ImageMagick.tar.gz

$ cd ImageMagick-7.0.8-26/

To run configuration and to compile

$./configure 
$ make
$ sudo make install 

To create link,

$ sudo ldconfig /usr/local/lib

Check version

$ magick -version

Thanks to Aaron Kili, Author of the below article.

Source: https://www.tecmint.com/install-imagemagick-on-debian-ubuntu/

Upvotes: 3

Rakesh Shukla
Rakesh Shukla

Reputation: 51

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

$ sudo apt-get install imagemagick libmagickwand-dev

This installs the ImageMagick on your machine.

You may now check its version as follows:

$ convert -version 

Installation directory: /usr/bin (you can find “convert” tool here)

$ which convert

/usr/bin/convert

Upvotes: 5

ernd enson
ernd enson

Reputation: 1762

I prefer using aptitude:

sudo aptitude update
sudo aptitude install imagemagick

and you're fine.

Upvotes: 1

ASDFG
ASDFG

Reputation: 21

To get rid of this error i executed ldconfig /usr/local/lib

Upvotes: 2

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

Alternatively, you can install ImageMagick from repositories, it should work out-of-the-box:

sudo apt-get install imagemagick

Upvotes: 13

Related Questions