need installation help

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
mightyfaulk

need installation help

Post by mightyfaulk »

Hey all,

I've been struggling to update to the most recent version of ImageMagick on my redhat linux dedicated server. I am not a linux pro or an IM pro, but I've got it somewhat working, however I think it requires some further tweaking.

The x86_64 rpm won't work, it's missing a few dependencies, judging by previous forum posts, in this case it seems best to compile one from source. After attempting to get all dependencies working and IM installed, I'm starting to see better results. Here is what convert -list configure shows:

Code: Select all

Name          Value
-------------------------------------------------------------------------------
CC            gcc -std=gnu99 -std=gnu99
CFLAGS        -fopenmp -g -O2 -Wall -W -pthread
CONFIGURE     ./configure 
COPYRIGHT     Copyright (C) 1999-2010 ImageMagick Studio LLC
CPPFLAGS      -I/usr/local/include/ImageMagick
CXX           g++
CXXFLAGS      -g -O2 -Wall -W -pthread
DEFS          -DHAVE_CONFIG_H
DELEGATES     bzlib fontconfig freetype jpeg jng jp2 lcms png rsvg x11 xml wmf zlib
DISTCHECK_CONFIG_FLAGS --disable-deprecated --with-quantum-depth=16 --with-umem=no --with-autotrace=no --with-gslib=no --with-fontpath=
EXEC-PREFIX   /usr/local
HOST          x86_64-unknown-linux-gnu
LDFLAGS       -L/usr/local/lib 
LIB_VERSION   0x661
LIB_VERSION_NUMBER 6,6,1,1
LIBS          -lMagickCore -llcms -lfreetype -ljasper -ljpeg -lpng -lfontconfig -lwmf -lwmflite -lXext -lSM -lICE -lX11 -lbz2 -L/lib64 -lrsvg-2 -lgdk_pixbuf-2.0 -lm -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0 -lxml2 -lz -lm -lgomp -lpthread 
NAME          ImageMagick
PCFLAGS       -fopenmp
PREFIX        /usr/local
QuantumDepth  16
RELEASE_DATE  2010-04-08
VERSION       6.6.1
WEBSITE       http://www.imagemagick.org
Few questions:
I've got ghostscript 8.71 installed and running, but it doesn't seem to found by IM. Am I correct? If so, how might I fix this?
Also, using PHP exec I've had to change exec("config") to exec("/usr/local/bin/config") to check version. After updating this in my PHP scripts, it appears to that not all functionality is working with the IM I built from the source. How would I go about fixing the location of config and what other dependencies do I need to get running?

Thanks for any help!
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: need installation help

Post by fmw42 »

exec("/usr/local/bin/config")
try

exec("/usr/local/bin/convert -list configure")
mightyfaulk

Re: need installation help

Post by mightyfaulk »

thanks, but my point there was to demonstrate that I used to be able to use:

Code: Select all

exec("convert -list configure")
rather than

Code: Select all

exec("/usr/local/bin/convert -list configure")
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: need installation help

Post by fmw42 »

that has to do with how PHP is set up. PHP does not normally know where IM convert is located and does not get it form the UNIX PATH. But you might be able to set the PHP PATH. See the params in phpinfo.php

PHP Variables:
_SERVER["PATH"]
_ENV["PATH"

I don't know if this works or not. I am not a PHP expert, but have been discussing this with user Bonzo as he had this problem. Two servers did as you said it should and one needed the extra /usr/local/bin. We are still puzzled about this.

Perhaps some PHP expert can comment. You might want to post also in the PHP API lists as well.
mightyfaulk

Re: need installation help

Post by mightyfaulk »

thank you for the information on that issue.

I still need to verify how well IM installed for me.. when I convert -list configure I don't see gs listed so I'm doubting the installation is complete.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: need installation help

Post by magick »

ImageMagick include support for the Ghostscript delegate library if it is installed on your system along with the development headers (gs.h). If it does not find the delegate library, ImageMagick instead uses the delegate program, gs. The delegate library generally has less overhead than the delegate program so it is recommended.
mightyfaulk

Re: need installation help

Post by mightyfaulk »

well that's a bit over my head but I appreciate the info. :) With my current installation, I can only get convert -list configure to work. Do any conversions (simple input to output) are failing. Is there any way I can get more info about my install?
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: need installation help

Post by magick »

These commands give useful information about your install:
  • convert -list configure
    convert -list format
    convert -debug configure logo: logo.pnm
mightyfaulk

Re: need installation help

Post by mightyfaulk »

awesome, thanks Magick. Actually, I followed your instructions on another post for using ImageMagick-devel and then upgrading to the latest source and that worked well!

My only remaining question is:

In php:

Code: Select all

exec("convert -version");
Gives me 6.1.8 (original RPM)

Code: Select all

exec("/usr/local/bin/convert -version")
Gives me 6.6.1 (updated source)

What would cause this?

Thank you again for your help!!!
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: need installation help

Post by magick »

You have two versions of ImageMagick installed on your system. The default is in /usr/bin and is picked up by PHP since /usr/bin is first in your execution path. You could always change the order of the execution path, however, specifying an absolute path (e.g. /usr/local/bin/convert) works as well.
mightyfaulk

Re: need installation help

Post by mightyfaulk »

Is there a way to remove the old version without removing the dependencies?
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: need installation help

Post by magick »

You can overwrite the older version by adding --prefix=/usr to your configure command line then remake and reinstall ImageMagick. Or you can manually remove a utility such as /usr/bin/convert. Otherwise check the RPM docs to find out how to uninstall an RPM without uninstalling its dependencies.
mightyfaulk

Re: need installation help

Post by mightyfaulk »

thank you Magick, you have been quite helpful! :D
Post Reply