简体   繁体   English

我怎样才能让Strawberry Perl的cpan(1)找到perl?

[英]How can I make Strawberry Perl's cpan(1) find perl?

I'm having trouble installing Template module with Strawberry Perl. 我在使用Strawberry Perl安装模块模块时遇到问题。

cpan Template

yields the following: 产生以下结果:

 Writing Makefile for AppConfig
 C:strawberryperlbinperl.exe: not found
 dmake.EXE:  Error code 255, while making 'blib\lib\.exists'`

I haven't been able to understand either 我也无法理解

  • how to affect the path so dmake will work correctly 如何影响路径,以便dmake正常工作
  • why the path (which is correct) does not have any \\ in it. 为什么路径(这是正确的)没有任何\\。

If you've been using MKS, you not only need to be sure you've removed it from your PATH, but you also need to ensure you don't have SHELL set to point to the MKS sh.exe. 如果您一直在使用MKS,那么您不仅需要确保已将其从PATH中删除,而且还需要确保没有将SHELL设置为指向MKS sh.exe。

I removed it from my PATH, and continued to struggle with this for a couple of more days until I realized dmake was invoking the wrong shell. 我把它从我的PATH中删除了,并且继续为此奋斗了几天,直到我意识到dmake正在调用错误的shell。

Hope this helps someone else down the road. 希望这可以帮助其他人。

The answer was I needed to uninstall (or at least remove from my path) the MKSTookit (basically a unix shell environment for Windows like Cygwin.) Not exactly sure why this fixed the problem - but it has cleared things up and I am able to install via CPAN. 答案是我需要卸载(或者至少从我的路径中移除)MKSTookit(基本上是像Cygwin这样的Windows的unix shell环境。)不完全确定为什么这样可以解决问题 - 但它已经解决了问题,我能够通过CPAN安装。 Thanks for everybody's answers and comments. 感谢大家的回答和评论。

You've probably been bit by escaping. 你可能有点逃避。 Somewhere something is configured with the path C:\\strawberryperl\\bin\\perl.exe , but those slashes need to be escaped to: 在某处使用路径C:\\strawberryperl\\bin\\perl.exe配置某些内容,但需要将这些斜杠转义为:

C:\\\\strawberryperl\\\\bin\\\\perl.exe

Not knowing more about how you installed your perl, I can't tell you where this bad config value is likely to be found. 我不知道你如何安装你的perl,我无法告诉你哪里可能找到这个糟糕的配置值。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM