0

I am trying to install ImageMagick using the official instructions.

I have executed the three export commands:

export MAGICK_HOME="$HOME/ImageMagick-6.9.2" export PATH="$MAGICK_HOME/bin:$PATH" export DYLD_LIBRARY_PATH="$MAGICK_HOME/lib/"

And I can make it to the end where I can execute:

> convert logo: logo.gif 
> identify logo.gif 
> display logo.gif

My $PATH shows imagemagick. However, when I close the terminal and re-examine $PATH, the imagemagick directory is missing.

What am I doing wrong? We isn't my $PATH saving after the exports?

Glorfindel
  • 4,089
  • 8
  • 24
  • 37
emehex
  • 127
  • 1
  • 1
  • 5

1 Answers1

0

full quote

Set the MAGICK_HOME environment variable to the path where you extracted the ImageMagick files. For example:

export MAGICK_HOME="$HOME/ImageMagick-6.9.2"

If the bin subdirectory of the extracted package is not already in your executable search path, add it to your PATH environment variable. For example:

export PATH="$MAGICK_HOME/bin:$PATH"

Set the DYLD_LIBRARY_PATH environment variable:

export DYLD_LIBRARY_PATH="$MAGICK_HOME/lib/

add those export commands to your .bashrc according to your installation.

this is necessary because all exported variables gets reset in a new shell. .bashrc is executed on shell startup, similar to .bash_profile but .bash_profile might not work in every case, it requires a login shell. make sure that no command placed in, .bashrc outputs anything, this will make commands like scp fail silently.

Schwertspize
  • 395
  • 2
  • 13
  • Yep. I ran all three export commands and it's still resetting. That's the problem. – emehex Aug 15 '15 at 21:58
  • these export commands save something in a variable. **variables get resettet every shell start** it's a feature, not a bug! you need to run them every time you want to use ImageMagick, so you can also add them to a kind of autorun. see my post. – Schwertspize Aug 16 '15 at 07:23
  • I'm sorry, I'm still not following. After running the three export commands, according to my installation paths, what do I need to run? – emehex Aug 16 '15 at 16:28
  • after running these exports, you can use the ImageMagick commands like convert, display,... according to. your question, your path isn't saved, because it's never saved. but you can set it each time you open the bash. if you enter a command in `.bashrc` it will be executed on every launch, including, but only, shell start. so you put these `export` commands in `.bashrc` and your path gets set every time you start a bash. – Schwertspize Aug 16 '15 at 16:33
  • "-bash: .bashrc: command not found" Man. I'm having zero luck. Sorry to be such a bother. Any ideas? – emehex Aug 16 '15 at 16:52