Question: I have one version image\_magic installed and I need to install another one with a slightly different configuration. I want to install it in a different location so there'll be in conflict and the 2nd one won't overwrite the 1st one. How can I do that? Does it have to do with "make" and "build"? Or only with "image\_magic" itself? In the documentation <https://github.com/ImageMagick/ImageMagick/blob/master/Install-unix.txt> I haven't found any mention about the matter. 

I want them two to be installed but only is visible and I want to be able to switch between them, maybe by rewritting $PATH.

Answer: 
To address the problem of having multiple installations of ImageMagick conflicting with each other, you can use the "--program-prefix" configuration setting, for example (after downloading and extracting the source tarball),

```
configure --with-quantum-depth=8 --prefix=$HOME \
          --exec-prefix=$HOME --program-prefix=q8
make install

```

This will put "q8convert" in your $HOME/bin. I use this all the time, so I can maintain both Q8 and Q16 builds simultaneously:

```
configure --with-quantum-depth=16 --prefix=$HOME \
          --exec-prefix=$HOME --program-prefix=q16
make clean
make install

```

After that, both "q8convert" and "q16convert" exist in $HOME/bin, and you can run either one even if your system has another "convert" installed in the standard search PATH. In fact the entire suite of utilities (q8magick, q16magick, q8identify, q8montage, q16identify, q16montage, etc.) gets installed as well.
The text below is from their site [see installation section](https://www.imagemagick.org/script/download.php):

Instead of using rpm or deb packages to install imageMagick, you can download archive and extract them in a right location in your filesystem. After that you can set environment variable as the site says:

Extract the contents of the package. For example:

```
tar xvzf ImageMagick.tar.gz

```

Set the MAGICK\_HOME environment variable to the path where you extracted the ImageMagick files. For example:

```
export MAGICK_HOME="$HOME/ImageMagick-7.0.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

```

On Linux and Solaris machines add $MAGICK\_HOME/lib to the LD\_LIBRARY\_PATH environment variable:

```
LD_LIBRARY_PATH="${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$MAGICK_HOME/lib
export LD_LIBRARY_PATH

```

Finally, to verify ImageMagick is working properly, type the following on the command line:

```
magick logo: logo.gif
identify logo.gif
display logo.gif

```