2016-02-01 59 views
1

提取草莓Perl的新副本后,我在CPANM中收到错误。CPANM路径配置不正确

C:\portable_perl>cpanm --self-upgrade 
You are running cpanm from the path where your current perl won't install execut 
ables to. 
Because of that, cpanm --self-upgrade won't upgrade the version of cpanm you're 
running. 

    cpanm path : C:\portable_perl\perl\bin/cpanm 
    Install path : C:\portable_perl\perl\site\bin 

It means you either installed cpanm globally with system perl, or use distro pac 
kages such 
as rpm or apt-get, and you have to use them again to upgrade cpanm. 

C:\portable_perl> 

安装后App::cpanminus我得到一个稍微不同的错误。

C:\portable_perl>cpanm --self-upgrade 
You are running cpanm from the path where your current perl won't install executables to. 
Because of that, cpanm --self-upgrade won't upgrade the version of cpanm you're running. 

    cpanm path : C:\portable_perl\perl\site\bin/cpanm 
    Install path : C:\portable_perl\perl\site\bin 

It means you either installed cpanm globally with system perl, or use distro packages such 
as rpm or apt-get, and you have to use them again to upgrade cpanm. 

C:\portable_perl> 

有没有什么办法可以设置路径?或者以不同的方式安装CPANM?如果有问题,我在Windows 7 x64上运行。

回答

0

该脚本

$0 !~ /^$install_base/ 

其中$0

C:\portable_perl\perl\site\bin/cpanm 

$install_base

C:\portable_perl\perl\site\bin 

这不是期待反斜杠。 \po\pe,\s\b在正则表达式中都有特殊的含义。这是cpanm中的一个错误。

+1

看起来像是[12月报道](https://github.com/miyagawa/cpanminus/issues/477)。 – ThisSuitIsBlackNot

+0

啊,好吧。那么,没有Windows解决方法? –

+0

@ThisSuitIsBlack我不是每天都在周五试图找到答案:( –