CPANM路径未正确配置

时间:2016-02-01 18:35:09

标签: perl perl-module cpan cpanm

在提取Strawberry Perl的新副本后,我在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上运行它。

1 个答案:

答案 0 :(得分: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中的错误。