Installing latest Image Magick on CentOS & PHP 5.3

Issues related to software problems.
Post Reply
dberebi
Posts: 4
Joined: 2012/01/26 15:32:32

Installing latest Image Magick on CentOS & PHP 5.3

Post by dberebi » 2012/01/26 15:37:10

I'm trying to install the latest ImageMagick and the php extension to use it.
I've tried to follow this guide:
http://codercake.com/installing-imagemagick-6-6-9-7-and-imagick-for-php-on-centos-5-5-64-bit/

But after running:

$ rpm -Uvh ImageMagick-6.7.4-8.x86_64.rpm

I'm just receiving the following error message:

error: Failed dependencies:
libHalf.so.4()(64bit) is needed by ImageMagick-6.7.4-8.x86_64
libIex.so.4()(64bit) is needed by ImageMagick-6.7.4-8.x86_64
libIlmImf.so.4()(64bit) is needed by ImageMagick-6.7.4-8.x86_64
libImath.so.4()(64bit) is needed by ImageMagick-6.7.4-8.x86_64
libcdt.so.4()(64bit) is needed by ImageMagick-6.7.4-8.x86_64
libfftw3.so.3()(64bit) is needed by ImageMagick-6.7.4-8.x86_64
libgraph.so.4()(64bit) is needed by ImageMagick-6.7.4-8.x86_64
libgvc.so.5()(64bit) is needed by ImageMagick-6.7.4-8.x86_64
liblzma.so.0()(64bit) is needed by ImageMagick-6.7.4-8.x86_64

Any idea how to solve that issue?

[b]I'm on CentOS Linux 5.7 64bit, PHP 5.3.3[/b]

I'm trying to do that because the version of ImageMagick in the CentOS repo is 6.2.8 (released in 2006), and I need more recent features. In this case I need to use http://php.net/manual/en/imagick.setimagematte.php that is available only if Imagick has been compiled against ImageMagick version 6.2.9 or newer

pschaff
Retired Moderator
Posts: 18276
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America
Contact:

Installing latest Image Magick on CentOS & PHP 5.3

Post by pschaff » 2012/01/26 22:40:39

Welcome to the CentOS fora. Please see the recommended reading for new users linked in my signature.

You are apparently trying to use a binary RPM not suitable for CentOS-5.7, or you are just not satisfying the dependencies. Could try
[code]yum localinstall ImageMagick-6.7.4-8.x86_64.rpm[/code]but you may need to add some 3rd party repos.

Your best bet is probably to find the latest Fedora SRPM that will [url=http://wiki.centos.org/HowTos/RebuildSRPM]rebuild[/url] on CentOS-5.7, or consider updating to 6.2 with ImageMagick.6.5.4.7-5.el6.

Edit: kbs CentOS Misc Testing repo has 6.6.0.2-8.el5.kb.1. See the [url=http://wiki.centos.org/AdditionalResources/Repositories]Repositories[/url] page.

dberebi
Posts: 4
Joined: 2012/01/26 15:32:32

Re: Installing latest Image Magick on CentOS & PHP 5.3

Post by dberebi » 2012/01/27 02:52:40

Thanks a lot pschaff!

I've already tried "localinstall" before, it didn't worked.

So I used the "kbs CentOS Misc Testing" repo and it worked!

[b]Just for the reference of others, here are the steps I've done:[/b]
First I cleaned everything with
[code]
yum remove ImageMagick ImageMagick-devel
pecl uninstall imagick
[/code]
Downloaded the file "kbsingh-CentOS-Misc.repo" and saved it in /etc/yum.repos.d/
[code]
cd /etc/yum.repos.d/
wget http://centos.karan.org/kbsingh-CentOS-Misc.repo
vi kbsingh-CentOS-Misc.repo
[/code]
I've changed it from:
[code]
[kbs-CentOS-Misc]
name=CentOS.Karan.Org-EL$releasever - Stable
gpgkey=http://centos.karan.org/RPM-GPG-KEY-karan.org.txt
gpgcheck=1
! enabled=1
baseurl=http://centos.karan.org/el$releasever/misc/stable/$basearch/RPMS/

# NOTE: packages in the Testing repo are NOT signed
[kbs-CentOS-Misc-Testing]
name=CentOS.Karan.Org-EL$releasever - Testing
gpgkey=http://centos.karan.org/RPM-GPG-KEY-karan.org.txt
gpgcheck=0
! enabled=0
baseurl=http://centos.karan.org/el$releasever/misc/testing/$basearch/RPMS/
[/code]
into:
(disabling "kbs-CentOS-Misc", enabling "kbs-CentOS-Misc-Testing" and limiting it to "ImageMagick*" packages of x86_64.
The exclamation marks shouldn't be in the file of course, they're here just to emphasize the changes)
[code]

[kbs-CentOS-Misc]
name=CentOS.Karan.Org-EL$releasever - Stable
gpgkey=http://centos.karan.org/RPM-GPG-KEY-karan.org.txt
gpgcheck=1
! enabled=0
baseurl=http://centos.karan.org/el$releasever/misc/stable/$basearch/RPMS/

# NOTE: packages in the Testing repo are NOT signed
[kbs-CentOS-Misc-Testing]
name=CentOS.Karan.Org-EL$releasever - Testing
gpgkey=http://centos.karan.org/RPM-GPG-KEY-karan.org.txt
gpgcheck=0
! enabled=1
! includepkgs=ImageMagick*x86_64
baseurl=http://centos.karan.org/el$releasever/misc/testing/$basearch/RPMS/
[/code]
Install ImageMagick 6.6.0 and imagick 3.0.1
[code]
yum install ImageMagick.x86_64 ImageMagick-devel.x86_64
pecl install imagick
[/code]
Enable the extension
[code]
echo 'extension=imagick.so' > /etc/php.d/imagick.ini
[/code]
Reload apache
[code]
service httpd reload
[/code]
And voila, here's the verifying result:
[code]
$ php --ri imagick

imagick

imagick module => enabled
imagick module version => 3.0.1
imagick classes => Imagick, ImagickDraw, ImagickPixel, ImagickPixelIterator
ImageMagick version => ImageMagick 6.6.0-2 2010-04-12 Q16 http://www.imagemagick.org
ImageMagick copyright => Copyright (C) 1999-2010 ImageMagick Studio LLC
ImageMagick release date => 2010-04-12
ImageMagick number of supported formats: => 204
ImageMagick supported formats => 3FR, A, AI, ART, ARW, AVI, AVS, B, BGR, BGRA, BMP, BMP2, BMP3, BRF, BRG, C, CAL, CALS, CAPTION, CIN, CIP, CLIP,
CMYK, CMYKA, CR2, CRW, CUR, CUT, DCM, DCR, DCX, DDS, DFONT, DNG, DOT, DPX, EPDF, EPI, EPS, EPS2, EPS3, EPSF, EPSI, EPT, EPT2, EPT3, ERF, FAX,
FITS, FRACTAL, FTS, G, G3, GBR, GIF, GIF87, GRADIENT, GRAY, GRB, GROUP4, HALD, HISTOGRAM, HRZ, HTM, HTML, ICB, ICO, ICON, INFO, INLINE, IPL,
ISOBRL, J2C, JNG, JP2, JPC, JPEG, JPG, JPX, K, K25, KDC, LABEL, M, M2V, M4V, MAP, MAT, MATTE, MIFF, MNG, MONO, MOV, MP4, MPC, MPEG, MPG, MRW, MSL,
MSVG, MTV, MVG, NEF, NULL, O, ORF, OTB, OTF, PAL, PALM, PAM, PATTERN, PBM, PCD, PCDS, PCL, PCT, PCX, PDB, PDF, PDFA, PEF, PES, PFA, PFB, PFM, PGM,
PGX, PICON, PICT, PIX, PJPEG, PLASMA, PNG, PNG24, PNG32, PNG8, PNM, PPM, PREVIEW, PS, PS2, PS3, PSB, PSD, PTIF, PWP, R, RADIAL-GRADIENT, RAF,
RAS, RBG, RGB, RGBA, RGBO, RLA, RLE, SCR, SCT, SFW, SGI, SHTML, SR2, SRF, STEGANO, SUN, SVG, SVGZ, TEXT, TGA, THUMBNAIL, TIFF, TIFF64, TILE,
TIM, TTC, TTF, TXT, UBRL, UIL, UYVY, VDA, VICAR, VID, VIFF, VST, WBMP, WMF, WMV, WMZ, WPG, X, X3F, XBM, XC, XCF, XPM, XPS, XV, XWD, Y, YCbCr, YCbCrA, YUV

Directive => Local Value => Master Value
imagick.locale_fix => 0 => 0
imagick.progress_monitor => 0 => 0
[/code]

dberebi
Posts: 4
Joined: 2012/01/26 15:32:32

Re: Installing latest Image Magick on CentOS & PHP 5.3

Post by dberebi » 2012/01/27 03:13:09

Mike, the author of the mentioned guide, suggested a different way:
[quote]
Installing a recent ImageMagick (6.6.5) and php-imagick can now be accomplished entirely via yum using the 3rd party repo "remi".
After you get the remi repo installed, you can do:
[code]
sudo yum install ImageMagick2 php-pecl-imagick --enablerepo=remi
[/code]
[/quote]
(the guide is linked at the start of this thread)

So now I'm considering using the remi repo, would you recommend removing ImageMagick and pecl imagick and reinstalling from the remi repo?
I see 2 advantages:
1. different peckage name so no conflict (or maybe this is a bad thing?)
2. newer version

Thanks a lot for your help

pschaff
Retired Moderator
Posts: 18276
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America
Contact:

Re: Installing latest Image Magick on CentOS & PHP 5.3

Post by pschaff » 2012/01/27 11:45:19

I can't say which approach is better for you, and you don't say where you got php 5.3.3 packages (perhaps the distro php53?), but if you use Remi's packages for ImageMagick2 and php-pecl-imagick, you probably need to use all his corresponding PHP packages.

In general, the fewer 3rd party repos you use, the fewer chances for dependency and other repo-mixing issues.

aairey
Posts: 1
Joined: 2012/04/10 07:34:35
Contact:

Re: Installing latest Image Magick on CentOS & PHP 5.3

Post by aairey » 2012/04/10 08:47:36

Thanks dberebi!

I managed to upgrade ImageMagick to 6.6.x.

I did encounter the following problem: I needed the following dependencies for ImageMagick, which were not installed yet.

[code]
jasper-1.900.1-7.el5.kb.x86_64.rpm
jasper-devel-1.900.1-7.el5.kb.x86_64.rpm
jasper-libs-1.900.1-7.el5.kb.x86_64.rpm
[/code]

I installed them with 'rpm-ivh' from http://centos.karan.org/el5/extras/testing/x86_64/RPMS/
So I could keep the repo.d clean with the includepkgs line.


Thanks again for the detailed guide.

pschaff
Retired Moderator
Posts: 18276
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America
Contact:

Re: Installing latest Image Magick on CentOS & PHP 5.3

Post by pschaff » 2012/04/10 17:48:24

Welcome to the CentOS fora [b]aairey[/b]. Please see the recommended reading for new users linked in my signature.

Thanks for your report of success with ImageMagick from kbs-CentOS-Misc-Testing. We still need to hear from [b]dberebi[/b] about any resolution of the topic.

dberebi
Posts: 4
Joined: 2012/01/26 15:32:32

Re: Installing latest Image Magick on CentOS & PHP 5.3

Post by dberebi » 2013/03/05 22:14:34

Hi again,

Last time I ended up using the remi repo, it's working great. My php packages are the php53 ones from the CentOS-5 - Base repo (including php-pear 1:1.4.9-8.el5 ).

On 2012-09-08 a new version of "php-pecl-imagick" released with the comment "Obsoletes php53*, php54* on EL"
( http://rpms.famillecollet.com/enterprise/5/remi/x86_64/repoview/php-pecl-imagick.html )

Since then, when I'm trying to update it using yum I'm of course receiving the following message:
[code]
...
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package php-pecl-imagick.x86_64 0:3.1.0-0.4.RC2.el5.remi.1 set to be updated
--> Processing Dependency: php(zend-abi) = 20100525 for package: php-pecl-imagick
--> Processing Dependency: php(api) = 20100412 for package: php-pecl-imagick
--> Finished Dependency Resolution
php-pecl-imagick-3.1.0-0.4.RC2.el5.remi.1.x86_64 from remi has depsolving problems
--> Missing Dependency: php(zend-abi) = 20100525 is needed by package php-pecl-imagick-3.1.0-0.4.RC2.el5.remi.1.x86_64 (remi)
php-pecl-imagick-3.1.0-0.4.RC2.el5.remi.1.x86_64 from remi has depsolving problems
--> Missing Dependency: php(api) = 20100412 is needed by package php-pecl-imagick-3.1.0-0.4.RC2.el5.remi.1.x86_64 (remi)
Error: Missing Dependency: php(api) = 20100412 is needed by package php-pecl-imagick-3.1.0-0.4.RC2.el5.remi.1.x86_64 (remi)
Error: Missing Dependency: php(zend-abi) = 20100525 is needed by package php-pecl-imagick-3.1.0-0.4.RC2.el5.remi.1.x86_64 (remi)
You could try ...
[/code]

Since my "php53-common" package provides older versions:
[code]
php(api) = 20090626
php(zend-abi) = 20090626
[/code]
( http://pkgs.org/centos-5-rhel-5/centos-rhel-x86_64/php53-common-5.3.3-13.el5_8.x86_64.rpm.html )

I also found the following page which might be related:
http://blog.famillecollet.com/post/2012/11/13/End-of-support-of-PHP-5.3-in-remi-repository

What should I do now?

Post Reply