Installing latest Image Magick on CentOS & PHP 5.3

Issues related to software problems.

Installing latest Image Magick on CentOS & PHP 5.3

Postby 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-imagema ... -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?

I'm on CentOS Linux 5.7 64bit, PHP 5.3.3

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
dberebi
 
Posts: 4
Joined: 2012/01/26 15:32:32

Installing latest Image Magick on CentOS & PHP 5.3

Postby 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: Select all
yum localinstall ImageMagick-6.7.4-8.x86_64.rpm
but you may need to add some 3rd party repos.

Your best bet is probably to find the latest Fedora SRPM that will rebuild 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 Repositories page.
pschaff
Retired Moderator
 
Posts: 18277
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America

Re: Installing latest Image Magick on CentOS & PHP 5.3

Postby 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!

Just for the reference of others, here are the steps I've done:
First I cleaned everything with
Code: Select all
yum remove ImageMagick  ImageMagick-devel
pecl uninstall imagick

Downloaded the file "kbsingh-CentOS-Misc.repo" and saved it in /etc/yum.repos.d/
Code: Select all
cd /etc/yum.repos.d/
wget http://centos.karan.org/kbsingh-CentOS-Misc.repo
vi kbsingh-CentOS-Misc.repo

I've changed it from:
Code: Select all
  [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/

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: Select all

  [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/

Install ImageMagick 6.6.0 and imagick 3.0.1
Code: Select all
yum install ImageMagick.x86_64 ImageMagick-devel.x86_64
pecl install imagick

Enable the extension
Code: Select all
echo 'extension=imagick.so' > /etc/php.d/imagick.ini

Reload apache
Code: Select all
service httpd reload

And voila, here's the verifying result:
Code: Select all
$ 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
dberebi
 
Posts: 4
Joined: 2012/01/26 15:32:32

Re: Installing latest Image Magick on CentOS & PHP 5.3

Postby dberebi » 2012/01/27 03:13:09

Mike, the author of the mentioned guide, suggested a different way:
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: Select all
sudo yum install ImageMagick2 php-pecl-imagick --enablerepo=remi


(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
dberebi
 
Posts: 4
Joined: 2012/01/26 15:32:32

Re: Installing latest Image Magick on CentOS & PHP 5.3

Postby 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.
pschaff
Retired Moderator
 
Posts: 18277
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America

Re: Installing latest Image Magick on CentOS & PHP 5.3

Postby 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: Select all
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


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.
aairey
 
Posts: 1
Joined: 2012/04/10 07:34:35

Re: Installing latest Image Magick on CentOS & PHP 5.3

Postby pschaff » 2012/04/10 17:48:24

Welcome to the CentOS fora aairey. 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 dberebi about any resolution of the topic.
pschaff
Retired Moderator
 
Posts: 18277
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America

Re: Installing latest Image Magick on CentOS & PHP 5.3

Postby 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/enterpris ... agick.html )

Since then, when I'm trying to update it using yum I'm of course receiving the following message:
Code: Select all
...
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 ...


Since my "php53-common" package provides older versions:
Code: Select all
php(api) = 20090626
php(zend-abi) = 20090626

( http://pkgs.org/centos-5-rhel-5/centos- ... 4.rpm.html )

I also found the following page which might be related:
http://blog.famillecollet.com/post/2012 ... repository

What should I do now?
dberebi
 
Posts: 4
Joined: 2012/01/26 15:32:32


Return to CentOS 5 - Software Support

Who is online

Users browsing this forum: No registered users and 2 guests