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.

  • 相关阅读:
    反转链表
    linux shell 读取配置文件的一个例子
    python 笔记碎片
    工作笔记整理
    linux服务器之间文件互传
    工作软件收集
    linux同步时间
    利用linux的df和du命令查看文件和目录的内存占用
    windows常用快捷键
    SUSE 12 安装 python3.6
  • 原文地址:https://www.cnblogs.com/church/p/2584864.html
Copyright © 2011-2022 走看看