2012-03-05 12 views
3

Windows XPではImage::MagickStrawberry Perl 5.12にインストールしようとしていますが、メイクファイルを生成するときにImageMagickモジュールが見つかりません。 makeはまた、多くのコンパイルエラーをスローします。Image :: Magick on Strawberry Perl 5.12

私はImage::MagicのREADMEに書かれている正確に何をした:

Installation - Win32 Strawberry perl 

    On Win32 Strawberry Perl the preferred way of installing PerlMagick is the 
    following: 

    1) Download and install ImageMagick Windows binaries from 
    http://www.imagemagick.org/script/binary-releases.php#windows 

    2) You HAVE TO choose dynamic (DLL) ImageMagick binaries. Note: it is not 
    possible to mix 32/64bit binaries of Perl and ImageMagick 

    3) During installation select that you want to install ImageMagick's 
    development files (libraries+headers) 

    4) You NEED TO have ImageMagick's directory in your PATH. Note: we are 
    checking the presence of convert.exe or identify.exe tools 

    5) You might need Visual C++ Redistributable Package installed on your 
    system. See instructions on ImageMagick's Binary Release webpage. 

    6) If you have all prerequisites 1)...5) you can simply install 
    ImageMagick by running: cpan -i Image::Magick 

そして、私はこれを取得しています:

################################### WARNING! ################################### 
# It seems that you are trying to install Perl::Magick on a MS Windows box with 
# perl + gcc compiler (e.g. Strawberry Perl), however we cannot find ImageMagick 
# binaries installed on your system. 
# 
# Please check the following prerequisites: 
# 
# 1) You need to have installed ImageMagick Windows binaries from 
# http://www.imagemagick.org/script/binary-releases.php#windows 
# 
# 2) We only support dynamic (DLL) ImageMagick binaries 
# note: it is not possible to mix 32/64-bit binaries of perl and ImageMagick 
# 
# 3) During installation select that you want to install ImageMagick's 
# 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 identify.exe tools 
# 
# 5) You might need Visual C++ Redistributable Package installed on your system 
# see instructions on ImageMagick's Binary Release webpage 
# 
# We are gonna continue, but chances for successful build are very low! 
################################################################################ 
Note (probably harmless): No library found for -lMagickCore 
Note (probably harmless): No library found for -lmoldname 
Note (probably harmless): No library found for -lkernel32 
Note (probably harmless): No library found for -luser32 
Note (probably harmless): No library found for -lgdi32 
Note (probably harmless): No library found for -lwinspool 
Note (probably harmless): No library found for -lcomdlg32 
Note (probably harmless): No library found for -ladvapi32 
Note (probably harmless): No library found for -lshell32 
Note (probably harmless): No library found for -lole32 
Note (probably harmless): No library found for -loleaut32 
Note (probably harmless): No library found for -lnetapi32 
Note (probably harmless): No library found for -luuid 
Note (probably harmless): No library found for -lws2_32 
Note (probably harmless): No library found for -lmpr 
Note (probably harmless): No library found for -lwinmm 
Note (probably harmless): No library found for -lversion 
Note (probably harmless): No library found for -lodbc32 
Note (probably harmless): No library found for -lodbccp32 
Note (probably harmless): No library found for -lcomctl32 
Writing Makefile for Image::Magick 
Writing MYMETA.yml and MYMETA.json 

しかし、ImageMagickのバイナリがインストールされていると、パス変数に。

これを実行するにはどうすればよいですか?

+0

これらの不足しているライブラリは、手順5で説明した* Visual C++再配布可能パッケージ*とよく似ています。Win32の専門家は、確認してください。 – daxim

+0

Visual C++再頒布可能パッケージが私のシステムにインストールされています。 – Demnogonis

+0

コマンドラインから "convert.exe"を実行すると失敗しますか? –

答えて

2

解決策が見つかりました。

問題は、Makefile.plが間違ったディレクトリのバイナリを探すことです。

  1. 最新のImageMagickパッケージを入手してください。 click
  2. これを解凍し、PerlMagickフォルダ
  3. open Makefile.plにエディタで移動します。
  4. は、最初のforeachブロックを見てみましょう:

foreach my $line (split '\n', $conf) {

if ($line =~ /^Path:\s+(.*)/) { 
    my ($vol,$dir,$file) = splitpath($1); 
    next unless $dir; 
    my $dirpath = catpath($vol, $dir); 
    my (@l,@b,@i) = ((),(),()); 

    # try to detect 'lib' dir 
    push @l, catfile($dirpath,'..','lib'); 
    push @l, catfile($dirpath,'..','..','lib'); 
    push @l, catfile($dirpath,'..','..','..','lib'); 
    foreach (@l) { push @libdir, $_ if (-d $_) }; 

    # try to detect 'bin' dir 
    push @b, catfile($dirpath,'..'); 
    push @b, catfile($dirpath,'..','bin'); 
    push @b, catfile($dirpath,'..','..'); 
    push @b, catfile($dirpath,'..','..','bin'); 
    push @b, catfile($dirpath,'..','..','..'); 
    push @b, catfile($dirpath,'..','..','..','bin'); 
    foreach (@b) { push @bindir, $_ if (-e "$_/convert.exe" || -e "$_/identify.exe") }; 

    # try to detect 'include' dir 
    push @i, catfile($dirpath,'..','include'); 
    push @i, catfile($dirpath,'..','include','ImageMagick'); 
    push @i, catfile($dirpath,'..','..','include'); 
    push @i, catfile($dirpath,'..','..','include','ImageMagick'); 
    push @i, catfile($dirpath,'..','..','..','include'); 
    push @i, catfile($dirpath,'..','..','..','include','ImageMagick'); 
    foreach (@i) { push @incdir, $_ if (-e "$_/magick/MagickCore.h") }; 
} 

}

スクリプトは、%PATH%をからIMのインストールの場所を取得し、ビンを探し、libとフォルダが含まれます。実際の場所を除いてどこにでも見えます。

だからあなただけのこれらを追加する必要があります。その後

# try to detect 'lib' dir 
push @l, catfile($dirpath,'lib'); 
... 
# try to detect 'bin' dir 
push @b, catfile($dirpath); 
... 
# try to detect 'include' dir 
push @i, catfile($dirpath,'include'); 
... 

あなたがperl Makefile.plを実行することができますし、それが正しくメイクファイルを生成します。次に、dmakedmake installと言うだけで問題ありません。

いつか誰かに役立つことを願っています。

+0

うわー!あなたは私のヒーローです!これは私のために働いた、私はとても欲求不満だった他の試してみてください..それは私のために働いて、私はそれをインストールすることができます。ありがとうございました! – Sismetic

+0

あなたは大歓迎です:) – Demnogonis

+0

dmakeテストを実行する際に問題が発生しました。多分あなたは私を助けることができます。スレッドは次のとおりです:http://stackoverflow.com/questions/13462775/test-failure-in-dmake-test-with-module-perlmagickimagemagick私は本当にそれを感謝します – Sismetic

1

また、Strawberry Perlに付属しているPerlパッケージマネージャーを使用することもできます。

「ppm」コマンドで始まり、「install Image-Magick」と入力します。 30秒後に完了です。

+1

それは私にはニュースです。私はppmがActivePerlだけで動作すると思ったのですか? –

+0

ストロベリー・パールにはそれ自身のppmが付いています。 私は最近、ActivePerlから移行しました。なぜなら、Perlバージョンを使用するためにもっと多くのお金が必要だったからです。私はVisual Studioのソースからすべてをコンパイルしていたマニアを除いて、Windowsのためのperlの代替手段がない時から彼らと一緒に行ってきました:) しかし、今はあまりにも欲張りになりました。 GUIデバッガだけが欠けていますが、ActivePerl PDKはStrawberry perlでうまく動作します。 – Sly

+0

ご清聴ありがとうございます。原則としてそれは動作するようです。残念ながら、Image-Magickは最新のStrawberryバージョンでは利用できないため、代わりにCPAN.pmを使用する必要があります。 –

関連する問題