简体   繁体   中英

Image::Magick::constant not defined

Does anyone know the cause of the following error:

Image::Magick::constant not defined.
The required ImageMagick libraries are not installed or not installed properly.

I've seen a number of posts related to this on the web, but no real resolution.
I'm using ActivePerl 5.16.3 (MSWin32-x86-multi-thread) on a windows 7 desktop with ImageMagick-6.8.4-Q16 installed.
The library appears to install correctly from the included "Image-Magick.ppd" file, with the DLL and supporting files installed in the expected Perl module locations.
Is it possible that the compiled Image::Magick DLL is not compatible with a multi-thread version of Perl?

Well, I don't really know why this resolves the issue, but I did a rollback to ImageMagick-6.8.3-Q16, changed the path statement to reference the older version of "ImageMagick-6.8.3-Q16" and reinstalled the Image-Magick PPD in the 6.8.3 directory using PPM, then rebooted the system again.

C:\Program Files\ImageMagick-6.8.3-Q16\PerlMagick>perl -v

This is perl 5, version 16, subversion 3 (v5.16.3) built for MSWin32-x86-multi-thread
(with 1 registered patch, see perl -V for more detail)

Copyright 1987-2012, Larry Wall

Binary build 1603 [296746] provided by ActiveState http://www.ActiveState.com
Built Mar 13 2013 11:29:21

Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl".  If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.


C:\Program Files\ImageMagick-6.8.3-Q16\PerlMagick>ppm install Image-Magick.ppd
Unpacking Image-Magick-6.82...done
Generating HTML for Image-Magick-6.82...done
Updating files in site area...done
   2 files unchanged
   6 files updated

C:\Program Files\ImageMagick-6.8.3-Q16\PerlMagick>

My code now runs without the "Image::Magick::constant not defined" error. I'm not sure if this indicates a problem with my desktop config or a conflict with ActivePerl 5.16.3 and ImageMagick-6.8.4-Q16 but it resolved my issue.

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