尝试运行Perl脚本(这里是Perl的新功能)时,会弹出以下错误:
Can't locate XML/Checker/Parser.pm in @INC (@INC contains: ./test/lib ./build/lib ./lib /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .)
我仔细检查了XML :: Parser和perl-XML-Parser(yum存储库)软件包是否已安装...
$ sudo perl -MCPAN -e 'install XML::Parser'
Reading '/root/.cpan/Metadata'
Database was generated on Wed, 17 Oct 2018 10:17:03 GMT
XML::Parser is up to date (2.44).
正在找到解析器包。
$ locate Parser.pm
/usr/lib64/perl5/vendor_perl/HTML/HeadParser.pm
/usr/lib64/perl5/vendor_perl/HTML/Parser.pm
/usr/lib64/perl5/vendor_perl/HTML/PullParser.pm
/usr/lib64/perl5/vendor_perl/HTML/TokeParser.pm
/usr/lib64/perl5/vendor_perl/XML/Parser.pm
/usr/lib64/perl5/vendor_perl/XML/LibXML/SAX/Parser.pm
/usr/share/perl5/vendor_perl/Pod/Simple/PullParser.pm
/usr/share/perl5/vendor_perl/TAP/Parser.pm
我正在运行的版本是Perl v5.16.3。
$ perl -v
This is perl 5, version 16, subversion 3 (v5.16.3) built for x86_64-linux-thread-multi
(with 33 registered patches, see perl -V for more detail)
我在这里想念什么?我尝试卸载并重新安装软件包都无济于事,而我真正在线上能找到的最大建议是“确保已安装这些软件包”。