0
我正在嘗試使用cpan安裝Array::Iterator
和Text::ParseWords
。我在OSX上用cpan v1.61
和perl v5.18.2
。與cpan安裝的模塊沒有顯示
當我啓動cpan,在初始配置後,我鍵入install "Array::Iterator"
,它似乎安裝正確。但是,當我嘗試使用use Array::Iterator
運行我的perl腳本,我得到:7
Can't locate Array/Iterator.pm in @INC (you may need to install the Array::Iterator module) (@INC contains: /Library/Perl/5.18/darwin-thread-multi-2level /Library/Perl/5.18 /Network/Library/Perl/5.18/darwin-thread-multi-2level /Network/Library/Perl/5.18 /Library/Perl/Updates/5.18.2 /System/Library/Perl/5.18/darwin-thread-multi-2level /System/Library/Perl/5.18 /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level /System/Library/Perl/Extras/5.18 .) at ./parse.pl line 7.
at ./parse.pl line 7.
main::BEGIN() called at ./parse.pl line 7
eval {...} called at ./parse.pl line 7
BEGIN failed--compilation aborted at ./parse.pl line 7.
at ./parse.pl line 7.
線路是:
use Array::Iterator;
可能是一個路徑問題。嘗試打印(@INC);在你的代碼中。它返回的目錄列表應包括新模塊安裝到的位置。另外,你的盒子上只有一個perl版本嗎? –