12

When I run my perl script, I keep getting this error: Can't locate XML/Simple.pm in @INC after install

I have installed a bunch of modules, including Bundle::CPANxxl with CPAN.

The first time I ran/installed CPAN, I executed it as root:

$ sudo cpan

Then again:

$ sudo cpan
cpan> install Bundle::CPANxxl
cpan> install Xml::Simple

When I run my Perl script, I still get the Can't locate XML/Simple.pm in @INC... error in Apache "error.log"

I have run the following with and without root:

cpan> install XML::Simple
cpan> upgrade
cpan> realod cpa

Why am I getting this error all the time, even though I have installed the module several times? Please can I have some advice on this issue?

Chubeez
  • 121
  • 1
  • 1
  • 4
  • 3
    Solved the XML::Simple issue with `apt-get install libxml-simple-perl` but it seems I only solved one problem as now there is a second Perl mod that "Can't be located". Still need to figure out why Perl is not finding the other libs... – Chubeez Aug 06 '14 at 18:05

4 Answers4

13

just

$ cpan install XML::Simple

work for me , maybe its because lowcase caracter : Xml and not XML

ron
  • 726
  • 11
  • 16
3

I ran into a similar issue and installing the missing lib as @chubeez mentionned in his comments long ago solved the problem.

apt-get install libxml-simple-perl

I rewrote it here as an answer to give it more visibility.

flyingdutchman
  • 326
  • 3
  • 15
1
$ sudo cpan XML::Simple

Above command works for me

jackchen
  • 71
  • 8
0

In conda environment, following commands worked for me:

conda install -c conda-forge perl-xml-parser
cpan install XML::Simple
ST24
  • 141
  • 7