Page 1 of 1

HELP please, installing imagemagick on linux CentOs 64

Posted: 2011-03-17T21:23:34-07:00
by javismiles
dear friends, im a bit desperate in here, i have moved to a new server, it is a

Linux CentOS CentOS 5.5-64
previously i was on a windows server where imagemagick ran beautifully, now i have moved to a
CentOS CentOS 5.5-64

i cannot manage to install imagemagick, whatever i tried, i am following all the intructions on
http://www.imagemagick.org/script/advan ... lation.php

please give me a hand because i need to meet a deadline and have the website up on the new server,
when i try to install the linux version i get this error:
rpm -ivh ImageMagick-6.6.rpm
error: Failed dependencies:
libltdl.so.3()(64bit) is needed by ImageMagick-6.6.8-5.x86_64

if instead of installing it, i try to build it, then i get these errors:
rpmbuild --rebuild ImageMagick.src.rpm
Installing ImageMagick.src.rpm
warning: user cristy does not exist - using root
warning: group cristy does not exist - using root
warning: user cristy does not exist - using root
warning: group cristy does not exist - using root
error: Failed build dependencies:
bzip2-devel is needed by ImageMagick-6.6.8-5.x86_64
freetype-devel is needed by ImageMagick-6.6.8-5.x86_64
libjpeg-devel is needed by ImageMagick-6.6.8-5.x86_64
libpng-devel is needed by ImageMagick-6.6.8-5.x86_64
libtiff-devel is needed by ImageMagick-6.6.8-5.x86_64
giflib-devel is needed by ImageMagick-6.6.8-5.x86_64
perl-devel >= 5.8.1 is needed by ImageMagick-6.6.8-5.x86_64
ghostscript-devel is needed by ImageMagick-6.6.8-5.x86_64
djvulibre-devel is needed by ImageMagick-6.6.8-5.x86_64
libwmf-devel is needed by ImageMagick-6.6.8-5.x86_64
jasper-devel is needed by ImageMagick-6.6.8-5.x86_64
libtool-ltdl-devel is needed by ImageMagick-6.6.8-5.x86_64
libX11-devel is needed by ImageMagick-6.6.8-5.x86_64
libXext-devel is needed by ImageMagick-6.6.8-5.x86_64
libXt-devel is needed by ImageMagick-6.6.8-5.x86_64
lcms-devel is needed by ImageMagick-6.6.8-5.x86_64
libxml2-devel is needed by ImageMagick-6.6.8-5.x86_64
librsvg2-devel is needed by ImageMagick-6.6.8-5.x86_64
OpenEXR-devel is needed by ImageMagick-6.6.8-5.x86_64


i also tried with the generic unix version, and it kind of installed but like incomplete, and then convert executes but all commands fail

so whats the way to install successfully the latest imagemagick version on CentOS CentOS 5.5-64 ?

i need the latest version because i use the latest commands

thank you so much for any help
Jav

Re: HELP please, installing imagemagick on linux CentOs 64

Posted: 2011-03-17T21:43:58-07:00
by anthony
The easiest way is first install ImageMagick-devel RPM from yoru CentOS yum repository.
That will load all the dependant developemnt packages needed.

After all the dependencies have been installed remove the ImageMagick-devel from the system, its job is done.


For more information see, IM examples, APIs, Building
http://www.imagemagick.org/Usage/api/#building

I do recommend you build or download a SRPM, and then build your specific CentOS RPM's from the SRPM.

Re: HELP please, installing imagemagick on linux CentOs 64

Posted: 2011-03-17T22:04:00-07:00
by javismiles
thank you very much Anthony for your kind and quick response,
ok i am going to try that right now,
i am pretty new to Linux unfortunately but i will follow the instructions of that page, i used unix in the past, im just refreshing it all again now

i moved to linux from windows because i love apache-php-mysql and it was time to leave windows and move to linux,
curiosity, is there any reason why installing imagemagick in linux seems to be much more complex than doing it in windows?

thank u again Anthony, im trying to install it right now, if i have probs will write again here, thank u very much
jav

Re: HELP please, installing imagemagick on linux CentOs 64

Posted: 2011-03-17T22:09:44-07:00
by javismiles
hey Anthony

i followed that page, first i did
sudo yum groupinstall "Development Tools"
sudo yum install rpmdevtool libtool-ltdl-devel

then i downloaded the ImageMagick-6.6.8-5.src.rpm

and then i did the : nice rpmbuild --nodeps --rebuild ImageMagick-6.6.8-5.src.rpm

but i got these build errors, any suggestions?

RPM build errors:
user cristy does not exist - using root
group cristy does not exist - using root
user cristy does not exist - using root
group cristy does not exist - using root
File not found by glob: /var/tmp/ImageMagick-6.6.8-5-root-root/usr/lib64/Ima geMagick-6.6.8/modules-Q16/coders/djvu.*
File not found by glob: /var/tmp/ImageMagick-6.6.8-5-root-root/usr/lib64/Ima geMagick-6.6.8/modules-Q16/coders/djvu.*
File not found by glob: /var/tmp/ImageMagick-6.6.8-5-root-root/usr/lib64/lib Magick++.so.4*
File not found: /var/tmp/ImageMagick-6.6.8-5-root-root/usr/bin/Magick++-conf ig
File not found: /var/tmp/ImageMagick-6.6.8-5-root-root/usr/include/ImageMagi ck/Magick++.h
File not found: /var/tmp/ImageMagick-6.6.8-5-root-root/usr/lib64/libMagick++ .so
File not found: /var/tmp/ImageMagick-6.6.8-5-root-root/usr/lib64/pkgconfig/M agick++.pc
File not found: /var/tmp/ImageMagick-6.6.8-5-root-root/usr/lib64/pkgconfig/I mageMagick++.pc
File not found by glob: /var/tmp/ImageMagick-6.6.8-5-root-root/usr/share/man /man1/Magick++-config.*


the part that i didnt know how to do at beginning was this
"You should also ensure that the these packages and their dependancies (such as jpeg and png development libraries) are also installed:
freetype-devel ghostscript-devel libwmf-devel jasper-devel lcms-devel bzip2-devel librsvg2 librsvg2-devel liblpr-1 liblqr-1-devel libtool-ltdl-devel autotrace-devel"

as i dont know how to check in linux for those libraries or how to install them, any suggestions?

also when i ran these
sudo yum groupinstall "Development Tools"
sudo yum install rpmdevtool libtool-ltdl-devel

the second one completed all well
the first one found problems also:

--> Missing Dependency: gcc = 4.1.2-48.el5 is needed by package gcc-c++-4.1.2-48.el5.x86_64 (base)
gcc-gfortran-4.1.2-48.el5.x86_64 from base has depsolving problems
--> Missing Dependency: gcc = 4.1.2-48.el5 is needed by package gcc-gfortran-4.1.2-48.el5.x86_64 (base)
Error: Missing Dependency: gcc = 4.1.2-48.el5 is needed by package gcc-gfortran-4.1.2-48.el5.x86_64 (base)
Error: Missing Dependency: gcc = 4.1.2-48.el5 is needed by package gcc-c++-4.1.2-48.el5.x86_64 (base)
You could try using --skip-broken to work around the problem
You could try running: package-cleanup --problems
package-cleanup --dupes
rpm -Va --nofiles --nodigest
The program package-cleanup is found in the yum-utils package.



question, nobody has a ready to install CentOS 64 package?
few people run imagemagick on CentOS linux?

thank u again
jav

Re: HELP please, installing imagemagick on linux CentOs 64

Posted: 2011-03-17T22:59:57-07:00
by javismiles
i tried again , got these errors,
i dont understand, im following your instructions, i installed the development environment first,

RPM build errors:
user cristy does not exist - using root
group cristy does not exist - using root
user cristy does not exist - using root
group cristy does not exist - using root
File not found by glob: /var/tmp/ImageMagick-6.6.8-5-root-root/usr/lib64/ImageMagick-6.6.8/modules-Q16/coders/djvu.*
File not found by glob: /var/tmp/ImageMagick-6.6.8-5-root-root/usr/lib64/ImageMagick-6.6.8/modules-Q16/coders/djvu.*
File not found by glob: /var/tmp/ImageMagick-6.6.8-5-root-root/usr/lib64/libMagick++.so.4*
File not found: /var/tmp/ImageMagick-6.6.8-5-root-root/usr/bin/Magick++-config
File not found: /var/tmp/ImageMagick-6.6.8-5-root-root/usr/include/ImageMagick/Magick++.h
File not found: /var/tmp/ImageMagick-6.6.8-5-root-root/usr/lib64/libMagick++.so
File not found: /var/tmp/ImageMagick-6.6.8-5-root-root/usr/lib64/pkgconfig/Magick++.pc
File not found: /var/tmp/ImageMagick-6.6.8-5-root-root/usr/lib64/pkgconfig/ImageMagick++.pc
File not found by glob: /var/tmp/ImageMagick-6.6.8-5-root-root/usr/share/man/man1/Magick++-config.*

Re: HELP please, installing imagemagick on linux CentOs 64

Posted: 2011-03-17T23:29:32-07:00
by javismiles
Goooooooooooooood news
i think it has installed now,
i found good instructions on another page and i post them here so that they can help other people,
i have tested from the command line "convert image1.jpg image1.png" and it worked


yum install tcl-devel libpng-devel libjpeg-devel ghostscript-devel bzip2-devel freetype-devel libtiff-devel wget url to ImageMagick download

wget ftp://ftp.imagemagick.org/pub/ImageMagi ... 4-5.tar.gz
tar xvfz /ImageMagick-6.6.4-5.tar.gz
cd (the folder)

./configure --prefix=/usr/local --with-bzlib=yes --with-fontconfig=yes --with-freetype=yes --with-gslib=yes --with-gvc=yes --with-jpeg=yes --with-jp2=yes --with-png=yes --with-tiff=yes

make clean
make
make install

Re: HELP please, installing imagemagick on linux CentOs 64

Posted: 2011-03-17T23:30:38-07:00
by javismiles
now the only issue
is that from command line it works but not from php

any help please on Linux why could this be?
do i need to add imagemagick to the path? but i think its already there as i can execute it from all folders at command line

is it a permissions issue? do i need to give permissions to the php internet user? how do i do that?

thank u very much
jav

Re: HELP please, installing imagemagick on linux CentOs 64

Posted: 2011-03-18T00:25:50-07:00
by anthony
The djvu problem is because by default it wants to use djvu libraries.

Either remove that configuration from the srpm Spec file, or install the djvu development libraries.


As for PHP, it generally runs in a different environment to command line.

See the same IM examples, API page but look at the PHP sections for initial tests to get PHP working and figuring out what is happening.

http://www.imagemagick.org/Usage/api/#php

Remember there there are three interfaced to using IM from PHP. Two as PHP module API's the other is to do shell commands from the PHP. A lot of people like the former initially as there are lots of examples of command line IM commands now available. :-)