Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm trying to install ImageMagick PHP on a Plesk server (RedHat) and I get this error.

Please provide the prefix of Imagemagick installation [autodetect] : 
building in /var/tmp/pear-build-root/imagick-3.0.1
running: /tmp/tmpE0CvXB/imagick-3.0.1/configure --with-imagick
checking for egrep... grep -E
checking for a sed that does not truncate output... //bin/sed
checking whether to enable the imagick extension... yes, shared
[...]
Package Wand was not found in the pkg-config search path.
Perhaps you should add the directory containing `Wand.pc'
to the PKG_CONFIG_PATH environment variable
No package 'Wand' found
[...]   
: Function eregi() is deprecated in PEAR/Registry.php on line 735

: Function eregi() is deprecated in PEAR/Registry.php on line 735
ERROR: `/tmp/tmpE0CvXB/imagick-3.0.1/configure --with-imagick' failed

So I tried to remount tmp but got this error:

[root@me /]# mount -o remount,rw /tmp
mount: can't find /tmp in /etc/fstab or /etc/mtab

When I run the mount command I get the contents of mtab

/dev/mapper/SysVolGroup-LogVolRoot on / type ext3 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/sda1 on /boot type ext2 (rw)
tmpfs on /dev/shm type tmpfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
tmpfs on /usr/local/psa/handlers/before-local type tmpfs (rw)
tmpfs on /usr/local/psa/handlers/before-queue type tmpfs (rw)
tmpfs on /usr/local/psa/handlers/before-remote type tmpfs (rw)
tmpfs on /usr/local/psa/handlers/info type tmpfs (rw)
tmpfs on /usr/local/psa/handlers/spool type tmpfs (rw,mode=0770,gid=31)

Does anyone know how to troubleshoot this?

share|improve this question
add comment

1 Answer

Installing imagemagick using PECL in Redhat is a bit tricky: First, install the version available on redhat repos, wich are outdated : you are not going to use them, you are just installing them to let yum take care of some dependencies for you :)

yum install ImageMagick ImageMagick-devel
yum remove ImageMagick
yum install libtool-ltdl libtool-ltdl-devel freetype freetype-devel fontconfig-devel

Now, you have all the dependencies you need to install imagemagick from PECL

pecl install imagick

Don't forget to edit you php.ini to load it and restart you web server :)

share|improve this answer
    
thanks - so I got the host admin to install it for me, and now the module is available and working. one thing though is that I see in the PHP.net IMagick docs that certain effects (like vignetteImaging) are only available "if Imagick was compiled against ImageMagick 6.2.9). My version of IM is 6.2.8 12/13/11 Q16. How do I update this? –  torr Apr 21 '12 at 14:17
    
remove the version you installed and go for the last stable, there are rpms available : imagemagick.org/script/… –  m0ntassar Apr 21 '12 at 21:46
    
yes i managed to upgrade IM successfully -- but cannot get PECL to re-compile Imagick against the new version - it returns Skipping package "pecl/imagick", already installed as version 3.0.1 -- No valid packages found -- install failed –  torr Apr 21 '12 at 21:51
    
Which version of RHEL you are using? –  ALex_hha Jul 11 '13 at 21:27
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.