简体   繁体   English

图片:: Magick ::常量未定义

[英]Image::Magick::constant not defined

Does anyone know the cause of the following error: 有谁知道以下错误的原因:

Image::Magick::constant not defined. 图片:: Magick ::常数未定义。
The required ImageMagick libraries are not installed or not installed properly. 所需的ImageMagick库未安装或未正确安装。

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. 我在装有ImageMagick-6.8.4-Q16的Windows 7桌面上使用ActivePerl 5.16.3(MSWin32-x86-多线程)。
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. 该库似乎从包含的“ Image-Magick.ppd”文件中正确安装,并且DLL和支持文件安装在预期的Perl模块位置。
Is it possible that the compiled Image::Magick DLL is not compatible with a multi-thread version of Perl? 编译的Image :: Magick DLL是否可能与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. 好吧,我真的不知道为什么这可以解决问题,但是我回滚了ImageMagick-6.8.3-Q16,更改了路径声明以引用旧版本的“ ImageMagick-6.8.3-Q16”,然后重新安装了使用PPM在6.8.3目录中使用Image-Magick PPD,然后再次重新启动系统。

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. 我的代码现在运行时没有出现“ Image :: Magick :: constant not defined”错误。 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. 我不确定这是否表示我的桌面配置有问题或与ActivePerl 5.16.3和ImageMagick-6.8.4-Q16发生冲突,但是它解决了我的问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM