在@INC 中找不到 LWP/Simple.pm [英] Can't locate LWP/Simple.pm in @INC
问题描述
可能的重复:
安装缺少的 Perl 模块的最简单方法是什么?
我正在尝试运行 Perl 脚本 将 SCXML 转换为 Graphviz DOT.我将脚本的第一行修改为:
I'm attempting to run a Perl script to convert SCXML to Graphviz DOT. I modified the first line of the script to:
#!/usr/bin/env perl
和 chmod +x
文件.当我通过 ./scmxl2dot.pl
运行它时,我看到以下错误输出:
and chmod +x
the file. When I run it via ./scmxl2dot.pl
I see the following error output:
在@INC 中找不到 LWP/Simple.pm(@INC 包含:/opt/local/lib/perl5/site_perl/5.12.3/darwin-multi-2level/opt/local/lib/perl5/site_perl/5.12.3/opt/local/lib/perl5/vendor_perl/5.12.3/darwin-multi-2level/opt/local/lib/perl5/vendor_perl/5.12.3/opt/local/lib/perl5/5.12.3/darwin-multi-2level/opt/local/lib/perl5/5.12.3/opt/local/lib/perl5/site_perl/opt/local/lib/perl5/vendor_perl .) 在 ./scmxml2dot.pl 第 14 行.
BEGIN 失败 - 编译在 ./scmxml2dot.pl 第 14 行中止.
Can't locate LWP/Simple.pm in @INC (@INC contains: /opt/local/lib/perl5/site_perl/5.12.3/darwin-multi-2level /opt/local/lib/perl5/site_perl/5.12.3 /opt/local/lib/perl5/vendor_perl/5.12.3/darwin-multi-2level /opt/local/lib/perl5/vendor_perl/5.12.3 /opt/local/lib/perl5/5.12.3/darwin-multi-2level /opt/local/lib/perl5/5.12.3 /opt/local/lib/perl5/site_perl /opt/local/lib/perl5/vendor_perl .) at ./scmxml2dot.pl line 14.
BEGIN failed--compilation aborted at ./scmxml2dot.pl line 14.
文件的第 14 行是 use LWP::Simple;
Line 14 of the file is use LWP::Simple;
我该怎么做:
- 看看我是否安装了这个东西(模块?),和/或
- 获取 LWP::Simple 并使其可用于脚本?
这在 OS X 10.7.3 和 Perl 5.12.3 下运行(如错误所示).
推荐答案
您已经确定您没有它(可以在某处找到).
You're already determined that you don't have it (somewhere it can be found).
perl -MCPAN -e'install "LWP::Simple"'
这篇关于在@INC 中找不到 LWP/Simple.pm的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!