TCL/TCLSH 没有该文件或目录
我正在尝试在 Windows 7 上构建一个名为 Slicer3 的软件,该软件具有“超级构建”功能。 这是一个用于检查和构建 Slicer3 的一体化 TCL 脚本。
我运行 CYGWIN 并导航到正确的目录,然后运行脚本并得到:
$ ./Slicer3-svn/Scripts/getbuildtest.tcl
couldn't read file "./Slicer3-svn/Scripts/getbuildtest.tcl": no such file or directory
显然我确信该文件存在并且我给了它 777 权限。我以管理员身份运行 cygwin。
tcl 文件内容的开头是:
#!/bin/sh
# the next line restarts using tclsh \
exec tclsh "$0" "$@"
所以我尝试注释掉第 3 行并直接运行,
$ tclsh ./Slicer3-svn/Scripts/getbuildtest.tcl
但得到了相同的错误。 有什么想法吗?
I'm trying to build a software called Slicer3 on Windows 7 which features a "super build".
It's a All-in-one TCL Script to checkout and build Slicer3.
I ran CYGWIN and navigated til the correct directory, then ran the script and got:
$ ./Slicer3-svn/Scripts/getbuildtest.tcl
couldn't read file "./Slicer3-svn/Scripts/getbuildtest.tcl": no such file or directory
Obviously I am sure that the file exists and I gave it 777 permission. I'm running cygwin as admin.
The beginning of the tcl file's content is:
#!/bin/sh
# the next line restarts using tclsh \
exec tclsh "$0" "$@"
So I tried commenting out line 3 and running directly
$ tclsh ./Slicer3-svn/Scripts/getbuildtest.tcl
but got the same error.
Any idea?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我将尽力帮助排除故障:
确定您是否安装了 tclsh 并且它位于 PATH 中:
确定 tclsh 是否适用于简单脚本:
确定脚本是否存在且可读:
就行结束而言(DOS CRLF 与 Unix LF):
这样,如果任何步骤失败,我们就可以缩小问题范围。
I will try to help troubleshooting as much as I can:
Determine if you have tclsh installed and it is in the PATH:
Determine if tclsh works for a simple script:
Determine if the script exists and readable:
As far as line-ending (DOS CRLF vs. Unix LF):
This way, we can narrow down the problem, should any of the steps failed.
说明:TCLSH 无法读取文件:没有这样的文件或目录。
可能的原因:CYGWIN下的TCLSH无法正确解析Windows PATH,无法找到文件。
解决方法:将脚本移动到 CYGWIN 路径中。
只是将脚本移动到“更简单”的路径对我来说很有效。我不太确定原因,也不知道如何解决这种不当行为。
Description: TCLSH couldn't read file: no such file or directory.
Possible reason: TCLSH under CYGWIN does not resolve windows PATH's properly, and cannot find the files.
Workaround: move the script within the CYGWIN path.
just moving the script to a "simpler" path works for me. I'm not that sure about the reason, neither how to solve this misbehaviour.