简体   繁体   中英

Unable to install ImageMagick in WHM/Cpanel (Amazon EC2)

I tried a lot of different solutions I could find all over the web but to no avail, I installed IMAGICK from WHM and it gave me the following:

downloading imagick-3.1.2.tgz ...
Starting to download imagick-3.1.2.tgz (94,657 bytes)
.....................done: 94,657 bytes
15 source files, building
running: phpize
Configuring for:
PHP Api Version:         20131106
Zend Module Api No:      20131226
Zend Extension Api No:   220131226
Please provide the prefix of Imagemagick installation [autodetect] : building in /root/tmp/pear/pear-build-rootUt1Zdv/imagick-3.1.2
running: /root/tmp/pear/imagick/configure --with-imagick
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for a sed that does not truncate output... /bin/sed
checking for cc... cc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking whether cc understands -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for PHP prefix... /usr/local
checking for PHP includes... -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib
checking for PHP extension directory... /usr/local/lib/php/extensions/no-debug-non-zts-20131226
checking for PHP installed headers prefix... /usr/local/include/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... no
configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.
checking for gawk... gawk
checking whether to enable the imagick extension... yes, shared
checking whether to enable the imagick GraphicsMagick backend... no
checking ImageMagick MagickWand API configuration program... configure: error: not found. Please provide a path to MagickWand-config or Wand-config program.
ERROR: `/root/tmp/pear/imagick/configure --with-imagick' failed
The imagick.so object is not in /usr/local/lib/php/extensions/no-debug-non-zts-20131226
Tidying /usr/local/lib/php.ini...
No changes
Tidying /usr/local/cpanel/3rdparty/php/54/etc/php.ini...
No changes

I tried downloading the file and recompiling it too but nothing worked. Did I miss anything?

我认为路径存在问题,能否请您尝试将已编译的模块从“ / usr / lib”位置移至“ / usr / local / lib”位置,然后尝试一下。

First run following commands

1. "WHM Home » Software » Rebuild RPM Database"

2. yum install ImageMagick ImageMagick-devel

3. yum install pcre-devel

Then go to

Go to WHM -> Software -> Module Installers -> PHP Pecl (manage). On the box below “Install a PHP Pecl” enter “imagick” and click “Install Now” button – that’s all.  Restart Apache.

Above steps worked for me.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM