Nalina has asked for the wisdom of the Perl Monks concerning the following question:

I am trying to install Image-Magick module using ppm package. I downloaded the latest PerlMagick PPM (full) package from 'http://www.dylanbeattie.net/magick/downloads.html' and followed the instructions given in 'http://www.dylanbeattie.net/magick/howto.html'. But when I tried to install it by
C:\temp>ppm install Image-Magick.ppd
I got an error saying
Error: no suitable installation target found for package Image-Magick.
What do I do now?

Thanks & Regards

Nalina

Replies are listed 'Best First'.
Re: Image::Magick Error: no suitable installation target found for package Image-Magick.
by tachyon (Chancellor) on Aug 03, 2004 at 13:23 UTC

    What do I do now?

    The old fashioned method is to RTFS which you will find at Perl/site/lib/PPM/UI.pm. I found this file simply by greping for the error message. Here is the code in question.

    # Find the correct target for this package. This means matching the # LANGUAGE tag in the PPD. Basically we find out what LANGUAGE the PPD # represents, and we search through the targets looking for a subset w +hich # implement that language. If more than one target implements the lang +uage # and version, we pick the first. If none work, we fail. If the LANGUA +GE # tag is missing, or the LANGUAGE matches the given target, we use the # given target. # NOTE: because LANGUAGE is a child-node of IMPLEMENTATION, we _first_ + have to # search for an implementation that matches the target, _then_ we have + to # verify that the target supports the LANGUAGE tag. If it does, we ret +urn it, # otherwise we go on to the next target. sub choose_target { my $o = shift; for (@_) { # Load the target: my $target = PPM::UI::get_targ($_); next unless $target->ok; $target = $target->result; # Load the PPD and find a suitable implementation for this target: $o->make_complete($target); my $ppd = $o->getppd_obj($target); return $ppd unless $ppd->ok; # the package doesn't exist. my $impl = $ppd->result->find_impl($target); next unless $impl->ok; my $lang = $impl->result->language; # Older PPDs didn't have a LANGUAGE tag, so we must assume a Perl # implementation. For old-times' sake, we'll assume version 5.6.0 +is # required. unless (defined $lang) { $lang = PPM::PPD::Language->new({ NAME => 'Perl', VERSION => '5.6.0', }); } # Check if this implementation's language is understood by the tar +get: my $match = $lang->matches_target($target); return $match unless $match->ok; return Ok($target) if $match->result; } return Error( "no suitable installation target found for package $o->{name}." ); }

    So the error relates vaguely to the (lack of) a LANGUAGE attribute. As you can perhaps see if there is not a LANGUAGE tag in the PPM then it runs some default code. This is the code that is executing to give you the error message. This is a good place to put in some debugging print/warns so you can see what is going on. It may be as simple as adding a LANGUAGE tag to the PPD or possibly changing the default version to 5.8.x to get a valid lang that will match the target.

    cheers

    tachyon

Re: Image::Magick Error: no suitable installation target found for package Image-Magick.
by Anonymous Monk on Aug 03, 2004 at 06:02 UTC
    Do you not understand the error message? What is inside Image-Magick.ppd
      Image-Magick.ppd file contains the following lines.
      <SOFTPKG NAME="Image-Magick" VERSION="5,46,0,0"> <TITLE>Image-Magick</TITLE> <ABSTRACT></ABSTRACT> <AUTHOR></AUTHOR> <IMPLEMENTATION> <OS NAME="MSWin32" /> <ARCHITECTURE NAME="MSWin32-x86-multi-thread" /> <CODEBASE HREF="x86/Image-Magick.tar.gz" /> </IMPLEMENTATION> </SOFTPKG>
      I have got Image-Magick.tar.gz file is in x86 folder. Still getting the error <code> what is that error?

      Thanks & regards

      Nalina
        and what perl -V?
        Whats google say the error is?
      This is what I did on a windows machine: do not directly use PPM. the installer can do it for you... (I did it for ActivePerl 5.8.3 build 809 ) goto http://www.imagemagick.com/ click download button on top of page select the stable windows executable run it to install. and make sure to select the option to install PerlMagick !
      It sounds really simple, and I may be suggesting a redundancy, but try opening the interactive PPM shell in a DOS session, and entering install Image-Magick. PPM may be smart enough to download the exact version that it likes the best and install it for you. It worked seamlessly for me in a few previous versions of ActiveState, although my most recent update was to 5.6.1.