zoukankan      html  css  js  c++  java
  • Can't locate IPC/Run.pm in @INC

    编译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.

    解决方法:

    原文参考:http://nets.ucar.edu/nets/intro/staff/siemsen/tools/perl.html#log4perl

    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 shell
    install Log::Log4perl
    install HTML::TokeParser::Simple
    h
    q
    	

    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.

  • 相关阅读:
    webpack-dev-server
    python 基础语言 学习笔记
    react 避免重复渲染
    获取cookie
    解决 canvas 在高清屏中绘制模糊的问题
    h5页面点击事件ios没反应 移动端兼容性问题
    rem 刷新闪烁问题
    谷歌禁止input自动填充表单信息
    react 循环产生定时器
    IOS开发-UI学习-UIWebView,简单浏览器的制作
  • 原文地址:https://www.cnblogs.com/church/p/2584864.html
Copyright © 2011-2022 走看看