Install ImageMagick on Strawberry Perl on Win 10

PerlMagick is an object-oriented Perl interface to ImageMagick. Use this forum to discuss, make suggestions about, or report bugs concerning PerlMagick.
Post Reply
cspinks
Posts: 1
Joined: 2016-04-06T12:03:08-07:00
Authentication code: 1151

Install ImageMagick on Strawberry Perl on Win 10

Post by cspinks »

I'm having problems, I'm sure it's something that is being done, jut not by me right now. I installed Strawberry Perl 64 bit version (Strawberry Perl Mar 2016 (security fixes for CVE-2015-8607 + CVE-2015-8608 + CVE-2016-2381) 5.22.1.3 / 64bit ) and then did the ImageMagick-6.9.3-7-Q16-x64-dll.exe install. There were no pm modules on my system for Magic.pm anywhere. I tried to install the cpan Image::Magick, it doe not work either. When I try to run a script I get the message "Can't locate Image/Magick.pm in @INC (you may need to install the Image::Magick module) (@INC contains: C:/Strawberry/cpan/build/PerlMagick-6.89-hWduDH/blib/lib/Image C:/Strawberry/perl/site/lib C:/Strawberry/perl/vendor/lib C:/Strawberry/perl/lib .) at C:\Users\Colegate\Desktop\Perl\Image-Magick\image2.pl line 7. BEGIN failed--compilation aborted at C:\Users\Colegate\Desktop\Perl\Image-Magick\image2.pl line 7.".

Any thoughts?
jta2012
Posts: 4
Joined: 2012-09-21T11:17:14-07:00
Authentication code: 67789

Re: Install ImageMagick on Strawberry Perl on Win 10

Post by jta2012 »

Hi cspinks,

I run ImageMagick-6.9.4-1-Q16-x64-dll.exe, Strawberry Perl 5.22.0 (one revision below yours), and Win8.1 in dev and Win2012R2 in production (all x64).

Here's what I had to do:

* When installing ImageMagick, choose:
[x] Add application directory to your system path
[x] Install development headers and libraries for C and C++
(You might be tempted to check "[x] Install PerlMagick for Strawberry Perl v5.20" but that doesn't seem to do anything.)

* Open command prompt and run "cpan" to enter Strawberry Perl CPAN shell

* Run "notest install Image::Magick"

HOWEVER, I also found that once you install Image::Magick, there is no way to uninstall it or "make clean" or upgrade it... so if you upgrade ImageMagick binaries, you have to do a complete uninstall of the existing Perl and ImageMagick, and rename your c:\Strawberry folder, and then install Perl + Image::Magick fresh. (If you just run your existing Image::Magick module with upgraded ImageMagick binaries, it will kinda seem to work, but your Perl process may crash if it attempts anything interesting with Image::Magick.)

When I need to upgrade ImageMagick, what I've done in practice is to rebuild my entire Perl environment on a Win x64 dev machine, and then copy the C:\Strawberry\perl\site\lib\auto\Image\Magick folder to my production Win x64 machines along with the upgraded ImageMagick binaries... that way I don't have to re-install Perl + all other modules on production machines.

I'd be interested to hear if this works for you or if there's a better/easier way.
gubach
Posts: 45
Joined: 2013-12-13T11:13:29-07:00
Authentication code: 6789

Re: Install ImageMagick on Strawberry Perl on Win 10

Post by gubach »

Installing PerlMagick@Win makes me mad: tested the newest combination strawberry-perl-5.24.1.1-64bit and ImageMagick-7.0.4-8-Q16-x64-dll and the "notest install Image::Magick"-strategy did not work! (PerlMagick not found in @INC)

So I installed an old combination strawberry-perl-5.20.2.1-64bit and ImageMagick-6.8.9-1-Q8-x64-dll (I used the version of IM because cpan loads C:\STRAWB~1\cpan\sources\authors\id\J\JC\JCRISTY\PerlMagick-6.89-1.tar.gz) and this worked.

Now I tried the above mentioned ImageMagick-6.9.4-1-Q8-x64-dll (Q8 instead Q16) with strawberry-perl-5.24.1.1-64bit: succeed!

What to conclude from this? Perhaps that it works with IM 6.x.x but not with 7.0.x (legacy was selected)? Last version of IM6 was ImageMagick-6.9.7-8-Q8-x64-dll

So I tested strawberry-perl-5.24.1.1-64bit + ImageMagick-6.9.7-8-Q8-x64-dll: succeed!
Post Reply