如何让 Strawberry Perl 的 cpan(1) 找到 perl?
我在使用 Strawberry Perl 安装模板模块时遇到问题。
cpan Template
产生以下结果:
Writing Makefile for AppConfig
C:strawberryperlbinperl.exe: not found
dmake.EXE: Error code 255, while making 'blib\lib\.exists'`
我无法理解
- 如何影响路径,因此 dmake 可以正常工作,
- 为什么路径(这是正确的)中没有任何 \ 。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
如果您一直在使用 MKS,则不仅需要确保已将其从 PATH 中删除,还需要确保未将 SHELL 设置为指向 MKS sh.exe。
我将它从我的 PATH 中删除,并继续为此苦苦挣扎了几天,直到我意识到 dmake 调用了错误的 shell。
希望这对其他人有帮助。
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.
答案是我需要卸载(或者至少从我的路径中删除)MKSTookit(基本上是像 Cygwin 这样的 Windows 的 unix shell 环境。)不太确定为什么这解决了问题 - 但它已经解决了问题,我能够通过 CPAN 安装。
感谢大家的回答和评论。
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.
你可能因为逃跑而被咬了一口。某处配置了路径 C:\strawberryperl\bin\perl.exe,但这些斜杠需要转义为:
C:\\strawberryperl\\bin\\perl.exe由于
不知道更多关于如何安装 Perl 的信息,我无法告诉您可能在哪里找到这个错误的配置值。
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.