简体   繁体   中英

How to install Image::Magick in perl version 5.18

I need to install Image::Magick module in a machine and the credentials are below:

Windows Version - 7

Perl Version 5.18

Also I have tried so many ways like cpan ppm and also copied the module and directly pasted in the c:\\perl\\lib\\ and c:\\perl\\site\\lib and unfortunately no luck.

In cpan installed

Running install for module 'Image::Magick'
Running make for J/JC/JCRISTY/PerlMagick-6.89-1.tar.gz
Checksum for C:\\Perl\\cpan\\sources\\authors\\id\\J\\JC\\JCRISTY\\PerlMagick-6.89-1.tar.gz ok
./PerlMagick-6.89/
./PerlMagick-6.89/check.sh
./PerlMagick-6.89/Makefile.old
./PerlMagick-6.89/Makefile.nt
./PerlMagick-6.89/check.sh.in
./PerlMagick-6.89/demo/
./PerlMagick-6.89/demo/README
............
./PerlMagick-6.89/t/bzlib/read.t
./PerlMagick-6.89/t/input.fits
./PerlMagick-6.89/Makefile.PL
./PerlMagick-6.89/Makefile.PL.in
./PerlMagick-6.89/MANIFEST.SKIP
./PerlMagick-6.89/Makefile.am
./PerlMagick-6.89/Magick.xs
./PerlMagick-6.89/check

CPAN.pm: Building J/JC/JCRISTY/PerlMagick-6.89-1.tar.gz

Checking if your kit is complete...
Looks good
Generating a dmake-style Makefile
Writing Makefile for Image::Magick
Writing MYMETA.yml and MYMETA.json
JCRISTY/PerlMagick-6.89-1.tar.gz
[31m C:\\Perl\\bin\\dmake.exe -- NOT OK
Running make test
Can't test without successful make
Running make install
Make had returned bad status, install seems impossible

################################## WARNING! ####################
It seems that you are trying to install Perl::Magick on a MS Wi
perl + gcc compiler (eg strawberry perl), however we cannot f
binaries installed on your system.

Please check the following prerequisites:

  1. You need to have installed ImageMagick Windows binaries from
    https://www.imagemagick.org/script/download.php#windows

  2. We only support dynamic (DLL) ImageMagick binaries
    note: it is not possible to mix 32/64-bit binaries of perl a

  3. During installation select that you want to install ImageMag
    development files (libraries+headers)

  4. You also need to have ImageMagick's directory in your PATH
    note: we are checking the presence of convert.exe and/or ide

  5. You might need Visual C++ Redistributable Package installed
    see instructions on ImageMagick's Binary Release webpage

We are gonna continue, but chances for successful build are ver
################################################################
Warning (mostly harmless): No library found for -lMagickCore
Warning (mostly harmless): No library found for -lmoldname
Warning (mostly harmless): No library found for -lkernel32
Warning (mostly harmless): No library found for -luser32
Warning (mostly harmless): No library found for -lgdi32
Warning (mostly harmless): No library found for -lwinspool
Warning (mostly harmless): No library found for -lcomdlg32
Warning (mostly harmless): No library found for -ladvapi32
Warning (mostly harmless): No library found for -lshell32
Warning (mostly harmless): No library found for -lole32
Warning (mostly harmless): No library found for -loleaut32
Warning (mostly harmless): No library found for -lnetapi32
Warning (mostly harmless): No library found for -luuid
Warning (mostly harmless): No library found for -lws2_32
Warning (mostly harmless): No library found for -lmpr
Warning (mostly harmless): No library found for -lwinmm
Warning (mostly harmless): No library found for -lversion
Warning (mostly harmless): No library found for -lodbc32
Warning (mostly harmless): No library found for -lodbccp32
Warning (mostly harmless): No library found for -lcomctl32
to undefined at C:/Perl/lib/ExtUtils/Install.pm line 1198.
C:\\Perl\\bin\\dmake.exe: *** [pm_to_blib] Error 2
Failed during this command:
JCRISTY/PerlMagick-6.89-1.tar.gz : make NO
cpan> exit
Lockfile removed.

After Installation the error displays as:

D:>perl -wc test.pl
Can't locate Image/Magick.pm in @INC (you may need to install the >Image::Magick module) (@INC contains: C:/Perl/site/lib C:/Perl/lib .) at test.pl line 2.
BEGIN failed--compilation aborted at test.pl line 2.

It would be appreciated if someone could suggest the way to close this.

The Perl library Image::Magick is a wrapper around a C library called ImageMagick. You can't install the Perl library if the C library is not installed first. That's why your attempted cpan installation gave all of those "No library found" errors.

You can download the Windows version of ImageMagick from the project's web site . Once you have installed that, you can try to install the Perl library again.

Did you read the errors that you got from cpan ? I'm really not sure why, after getting a message saying "install seems impossible" you would try running a test program!

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