I need to use XML::LibXML in my project to handle a complex xml structure. I installed the corresponding perl module "perl-XML-LibXML-1.70-5.el6.src.rpm " as I'm using a system with CentOS 6(Kernel version-2.6.32-358.11.1.el6.centos.plus.x86_64). The above module installed with the following warnings:

1:perl-XML-LibXML warning: user mockbuild does not exist - usin +g root warning: group mockbuild does not exist - using root warning: user mockbuild does not exist - using root warning: group mockbuild does not exist - using root ########################################### [100%]

Then I tried to write a simple perl script to test whether it's working or not. Following is my test code:

test_2.pl -----------
#!/usr/bin/perl use XML::LibXML; $parser = XML::LibXML->new(); $doc = $parser->parse_file('TreeList_dup.xml'); print $doc->toString;

But here is the error message I got:

Can't locate XML/LibXML.pm in @INC (@INC contains: /usr/local/lib64/p +erl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/p +erl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at test_2.pl li +ne 3. BEGIN failed--compilation aborted at test_2.pl line 3.

Can anyone help me to understand the error message and tell me how to recover from it?


In reply to Can't locate XML/LibXML.pm in @INC by kingsaint

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.