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

一世执手 提交于 2019-12-10 13:39:28

问题


I'm having trouble installing Template module with 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
  • why the path (which is correct) does not have any \ in it.

回答1:


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.

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.

Hope this helps someone else down the road.




回答2:


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. Thanks for everybody's answers and comments.




回答3:


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

Not knowing more about how you installed your perl, I can't tell you where this bad config value is likely to be found.



来源:https://stackoverflow.com/questions/2923419/how-can-i-make-strawberry-perls-cpan1-find-perl

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!