我一直在努力在装有草莓perl发行版(strawberry-perl-5.28.1.1-64bit)的Windows机器上安装名为Date :: Calc的CPAN模块。它在任何步骤中都没有给出任何错误,但最终我找不到它已安装。我已经从CPAN org网站下载了该模块,并按照以下步骤进行了解压缩,perl Makefile.pl,make,make test和make install。请帮助我丢失什么或我要去哪里?
我遵循以下步骤:
Strawberry perl(5.28.1.1-64-bit)已安装在我的计算机上(一个月前安装了它)。一切正常。
将PATH变量设置为指向bin文件夹所在的perl / bin文件夹。首先,我尝试了命令cpan Date :: Calc。它在获取所需文件时给了我类似超时的错误。我怀疑这与我的客户IT /代理基础结构有关:
C:\SummitTools6.1\CPANModules>cpan Date::Calc
Loading internal logger. Log::Log4perl recommended for better logging
CPAN: CPAN::SQLite loaded ok (v0.212)
CPAN: LWP::UserAgent loaded ok (v6.36)
Fetching with LWP:
http://cpan.strawberryperl.com/authors/01mailrc.txt.gz
LWP failed with code[500] message[Can't connect to cpan.strawberryperl.com:80 (A connection attempt
failed because the connected party did not properly respond after a period of time, or established c
onnection failed because connected host has failed to respond.)]
Warning: no success downloading 'C:\SummitTools6.1\perl\cpan\sources\authors\01mailrc.txt.gz.tmp12016'. Giving up on it.
Fetching with LWP:
http://www.cpan.org/authors/01mailrc.txt.gz
LWP failed with code[500] message[Can't connect to www.cpan.org:80 (Invalid argument)]
Warning: no success downloading 'C:\SummitTools6.1\perl\cpan\sources\authors\01mailrc.txt.gz.tmp12016'. Giving up on it.
Fetching with LWP:
http://www.cpan.org/authors/01mailrc.txt.gz
然后我尝试从metacpan.org手动下载我感兴趣的模块的tar.gz文件。
将文件复制到不同于Strawberry Perl安装的位置。
gzip zxvf Date-Calc-6.4.tar.gz
cd Date-Calc-6.4
perl Makefile.pl
make
make test
make install
所有步骤都运行良好,但令人惊讶的是最后三个步骤,它们瞬间完成,并在stdout中仅打印了三行。
make[13]: Entering directory '/cygdrive/c/SummitTools6.1/CPANModules/Date-Calc-6.4'
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\SummitTools6.1\CPANModules\Date-Calc-6.4>C:\SummitTools6.1\CPANModules\Date-Calc-6.4>
还要注意,如果我运行
make >> 1.txt
为了将其输出捕获到文本文件中,将其挂在dos外壳中。但是,与此同时,我可以打开文本文件,该文本文件显示的内容与上面用斜体字粘贴的内容相同(如果我不重新输入文本文件,则与之前在终端的标准输出中显示的内容相同)。
当它挂起时,如果我中断Ctrl + C,它会显示几行,如下所示:
C:\SummitTools6.1\CPANModules\Bit-Vector-7.4>make
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\SummitTools6.1\CPANModules\Bit-Vector-7.4>
C:\SummitTools6.1\CPANModules\Bit-Vector-7.4>make >> 1.txt
make[1]: *** [blib\lib\Bit/.exists] Interrupt
C:\SummitTools6.1\CPANModules\Bit-Vector-7.4>Makefile:393: recipe for target 'blib\lib\Bit/.exists'
failed
make: *** [blib\lib\Bit/.exists] Interrupt
C:\SummitTools6.1\CPANModules\Bit-Vector-7.4>
由于Date :: Calc依赖于Bit :: Vector模块,因此我必须先对Bit :: Vector运行所有相同的步骤,然后再执行Date :: Calc。但是两个模块都有相同的问题/错误/没有错误。