Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

error "Can't locate XML/Parser.pm in @INC" at new perl version

Status
Not open for further replies.

uida1154

Programmer
Mar 1, 2004
163
NL
Hello all,

I had a perl script running on an old perl version, but last weekend the server migrated to solaris 2.8 with perl version v5.8.0 built for sun4-solaris.

The script begins as following:
Code:
#!/usr/bin/perl -w
use strict;
use FindBin;
use lib $FindBin::Bin;
use XML::Parser;

The error
Can't locate XML/Parser.pm in @INC (@INC contains: /home/uida1154/ccm_wa/Pt_Ehv/SQS-uida1154/SQS/Product_cm_items/Tooling/Crpr /usr/local/lib/perl5/5.8.0/sun4-solaris /usr/local/lib/perl5/5.8.0 /usr/local/lib/perl5/site_perl/5.8.0/sun4-solaris /usr/local/lib/perl5/site_perl/5.8.0 /usr/local/lib/perl5/site_perl .) at crpr_collector_6 line 5.
BEGIN failed--compilation aborted at crpr_collector_6 line 5.

Anybody ideas how to solve it?
 
try your script with using Findbin and see if that helps.

#!/usr/bin/perl -w
use strict;
#use FindBin;
#use lib $FindBin::Bin;
use XML::parser;
 
Ask the guys that made the migration, if they installed perl from scratch or upgraded perl.
If they installed the new perl, tell them to install the module you want.


``The wise man doesn't give the right answers,
he poses the right questions.''
TIMTOWTDI
 
Try to find the XML/Parser.pm file in your machine. Get the directory and then push it to @INC

BEGIN {push @INC,"/directory/XML"};

dmazzini
GSM System and Telecomm Consultant

 
Thank you all for your help. The problem has been found and is solved.

It appears that the new perl version expects the XML::parser module within a sub-path like XML/Parser.pm instead of the old way Parser.pm where within Parser.pm is stated XML::parser.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top