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.

  • 相关阅读:
    winform中的确定取消
    jquery ui
    BS中的 data:image/png;base64
    关于如何在MVC中 执行JS
    JS base64 加密和 后台 base64解密(防止中文乱码)
    jqgrid 中的事件
    URL重写无效
    JS创建缩略图
    ComponentArt.web.ui中文帮助之Grid(一)
    Microsoft Volta: Web时代的VB!
  • 原文地址:https://www.cnblogs.com/church/p/2584864.html
Copyright © 2011-2022 走看看