in reply to Re^6: Compilation failed in require at C:/mychoo/cg
in thread Compilation failed in require at C:/mychoo/cg

Closer... I was having a case sensitive misunderstanding. But now it still failed. Says to redo with force??

c:\>cpanm Image::Magick --> Working on Image::Magick Fetching http://www.cpan.org/authors/id/J/JC/JCRISTY/PerlMagick-6.89-1.tar.gz ... OK Configuring PerlMagick-6.89-1 ... OK Building and testing Image-Magick-6.89 ... FAIL ! Installing Image::Magick failed. See C:\Users\USER\.cpanm\work\1561238400.18228\build.log for details. Retry with --force to force install it.

Thanks so much!

  • Comment on Re^7: Compilation failed in require at C:/mychoo/cg

Replies are listed 'Best First'.
Re^8: Compilation failed in require at C:/mychoo/cg
by marto (Cardinal) on Jun 22, 2019 at 22:33 UTC
      That was the first thing I tried but clicking on the link goes no where!!
Re^8: Compilation failed in require at C:/mychoo/cg
by syphilis (Archbishop) on Jun 23, 2019 at 02:26 UTC
    Installing Image::Magick failed

    On Strawberry Perl, the following command should install Image::Magick:
    ppm install Image::Magick
    Please let me know if it doesn't. The command might need to be tweaked if your version of Strawberry Perl is a few years old.
    (For me, the installation terminates with a "cannot remove directory for ..." message. I think that's not a problem.)

    Cheers,
    Rob
      Thanks very much. I did miss that post. Sorry. OK although I got this message:
      Installing C:\STRAWB~1\perl\site\lib\Image\Magick.pm cannot remove directory for C:\Users\USER\.ppm/Image-Magick-5488: Permission denied at C:/Strawberry/perl/vendor/lib/PPM.pm line 490.

      It seemed to have worked as I ran the script again and it passed on to another error. So it looks like Magick is installed?? (I think!)

        cannot remove directory for C:\Users\USER\.ppm/Image-Magick-5488: Permission denied

        That's kind of strange. Have you been running some commands as Administrator and others as a normal user? It'd be best to run all the installations under a single user.

        So it looks like Magick is installed?? (I think!)

        One way to check whether a module is installed is just perl -MModule::Name -e "" on the command line - however, this requires that the command line has the same environment variables set as the web server (such as PERL5LIB). They could be different if, for example, your web server is started via a batch file that sets an environment variable, or if you have environment variables configured in your Apache configuration (e.g. SetEnv directives) that only the CGI scripts run by the web server see.

Re^8: Compilation failed in require at C:/mychoo/cg
by stevieb (Canon) on Jun 22, 2019 at 21:27 UTC

    If I recall correctly, Image::Magick requires external software to be installed, but I could be wrong.

    Did you do what the error message said, and read through your C:\Users\USER\.cpanm\work\1561238400.18228\build.log error log like you were advised to do?

    Forcing an install as your first response is not the way to go.