博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Can't locate IPC/Run.pm in @INC
阅读量:4562 次
发布时间:2019-06-08

本文共 1690 字,大约阅读时间需要 5 分钟。

编译perl,出现错误如下:

Can't locate IPC/Run.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.12.4 /usr/local/share/perl/5.12.4 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.12 /usr/share/perl/5.12 /usr/local/lib/site_perl .) at ./check_ipmi_sensor line 35.

 

解决方法:

原文参考:

Installing Perl modules with CPAN.pm (best way)

Use the CPAN.pm module. To read about it, do "perldoc CPAN", or in XEmacs use the Perldoc pull-down when you're editing a Perl file.

The first time you use CPAN.pm, it will ask a long series of questions, the answers for which can be found below. Don't answer them until you've installed ncftp on the local machine.

If you've already installed CPAN and just want to use it, do like

(as root)(sudo) perl -MCPAN -e shellinstall Log::Log4perlinstall HTML::TokeParser::Simplehq

The above will install Log4perl in /usr/lib/perl5/site_perl/5.6.1/Log/Log4perl.

I've had it happen that after a successful install like the above (no failure messages during the install) a Perl program still coudn't find the module. The .pm file was there, and in a directory listed in Perl's INC paths, but I still got the "Can't locate xyz.pm in @INC" message. It turned out that some of the intermediate directories above the .pm file were protected without 'x', so I didn't have permissions to read the directories. To fix it at the time, I did

(as root)find /usr/local/lib/site_perl -type d -exec chmod +x {} \;

 

The CPAN.pm module will store modules in, like, /usr/local/lib/perl5/site_perl/5.8.4, with your version of perl. If you run CPAN.pm with a different version of perl, modules will get stored in a different place.

转载于:https://www.cnblogs.com/church/archive/2012/07/10/2584864.html

你可能感兴趣的文章
10.15习题2
查看>>
Windows Server 2008 R2 备份与恢复详细实例
查看>>
Ubuntu上kubeadm安装Kubernetes集群
查看>>
关于java学习中的一些易错点(基础篇)
查看>>
MFC的多国语言界面的实现
查看>>
四则运算个人项目 最终版
查看>>
java线程系列---java5中的线程池
查看>>
SQL表连接
查看>>
新秀系列C/C++经典问题(四)
查看>>
memset函数具体说明
查看>>
经常使用的android弹出对话框
查看>>
确保新站自身站点设计的合理性的六大注意点
查看>>
1033. 旧键盘打字(20)
查看>>
The Zen of Python
查看>>
git安装及使用
查看>>
mysql一个非常实用解决sql查询优化的函数explain
查看>>
图文讲解NTFS和FAT32硬盘下 asp.net 生成word 错误: 80070005 和 错误:8000401a 的解决方法...
查看>>
《学习》5连接查询(高级查询)
查看>>
[BZOJ2730][HNOI2012]矿场搭建 点双 割点
查看>>
Linux/Mac 挂载远程服务器目录到本地
查看>>