Perl: V 5.8.8 : Can't locate auto/XML/LibXSLT/

2020-04-27 00:29发布

I am getting Can't locate auto/XML/LibXSLT/new.al error on my CentOS5 machine installed Perl 5.8.8

This issue is related with libxml2 and perl modules XML::LibXML, XML::LibXSLT. For both version in 1.70.

Upon settling both modules, further I am getting error for

Can't locate auto/XML/LibXSLT/new.al

which seems to be a autoload function of LibXSLT, But surprisingly I am not finding any file as new.al.

Here is the code snippet through which I am getting this error

use XML::LibXML;
use XML::LibXSLT;
my $parser = XML::LibXML->new;
my $xslt = XML::LibXSLT->new;

Any Help would be appreciated.

1条回答
Viruses.
2楼-- · 2020-04-27 01:01

I think your XML::LibXSLT installation is not healthy. Try below. It worked for me:

# yum -y install perl-XML-LibXSLT
# perl -e 'use XML::LibXSLT'

And it worked for me on ubuntu as well. Here is the command:

# aptitude install libxml-libxslt-perl
查看更多
登录 后发表回答