windowsperlstrawberry-perlxml-simple

Unable to locate XML/Simple.pm in windows


I have strawberry perl installed in my C drive in windows and running a build from an existing big project. During the build there are some perl build scripts that needs to be executed and in the it throws the below error message:

enter image description here

Below are the results of the commands I gave for verifying the existence of XML::Simple

enter image description here

I am wondering about the path /usr/local/lib in windows and perl is installed in C:\Strawberry\perl\bin and XML::Simple is in C:\Strawberry\perl\vendor\lib\XML and C:\Strawberry\perl\lib\XML.

EDIT: Output from perl -V. I have kept only for @INC

Built under MSWin32 Compiled at Aug 2 2020 19:51:20 @INC:

C:/Strawberry/perl/site/lib
C:/Strawberry/perl/vendor/lib
C:/Strawberry/perl/lib

Solution

  • It looks like the two situations are using different perl binaries with different library paths. When you run perl or cpan, you are using Strawberry Perl. Whatever you are doing at the top is likely using a different perl, perhaps from cygwin.

    You need to install modules with the perl that wants to use them. Find the cpan for that perl (perhaps look in the Makefile to see how its finding perl, and cpan should be in the same directory).

    Update your answer with the (text) output of perl -V. At the end of that output it will show the @INC directories. I'm guessing that list doesn't match the top image.