0

在遇到很多问题后,我设法开始cpan工作cygwin
我做到了: cpan[2]> i Log::Log4perl它似乎奏效了。即它下载了一些东西:

cpan[2]> i Log::Log4perl  
Fetching with LWP:  
http://cpan.localhost.net.ar/authors/01mailrc.txt.gz  
Going to read '/home/jsmith/.cpan/sources/authors/01mailrc.txt.gz'  
............................................................................DONE  
Fetching with LWP:  
http://cpan.localhost.net.ar/modules/02packages.details.txt.gz  
Going to read '/home/jsmith/.cpan/sources/modules/02packages.details.txt.gz'    
  Database was generated on Mon, 13 May 2013 17:53:03 GMT  
..............  
  New CPAN.pm version (v2.00) available.  
  [Currently running version is v1.960001]  
  You might want to try  
    install CPAN  
    reload cpan  
  to both upgrade CPAN.pm and run the new version without leaving  
  the current session.  


..............................................................DONE  
Fetching with LWP:  
http://cpan.localhost.net.ar/modules/03modlist.data.gz  
Going to read '/home/jsmith/.cpan/sources/modules/03modlist.data.gz'  
............................................................................DONE  
Going to write /home/akis/.cpan/Metadata  
Module id = Log::Log4perl  
    DESCRIPTION  Log4j implementation in Perl  
    CPAN_USERID  MSCHILLI (Michael Schilli <m@perlmeister.com>)  
    CPAN_VERSION 1.41  
    CPAN_FILE    M/MS/MSCHILLI/Log-Log4perl-1.41.tar.gz  
    DSLIP_STATUS ampOp (alpha,mailing-list,perl,object-oriented,Standard-Perl)  
    INST_FILE    (not installed)  

所以现在我有以下简单的脚本:

#!/usr/bin/perl  

use strict;  
use warnings;  

use Log::Log4perl qw(:easy);  

当我尝试运行它时,我得到:

Can't locate Log/Log4perl.pm in @INC

我在下面搜索~/.cpanLog4perl.pm找不到。为什么?没cpan安装?我需要做其他事情吗?

4

1 回答 1

3

cpan i提供有关包的信息。

用于cpan install ...安装包。

(或输入帮助寻求帮助...)

于 2013-05-25T21:09:26.920 回答