tcl错误读取包索引文件

时间:2016-11-28 07:03:09

标签: tcl

尝试在自动化中运行测试时出现以下错误。

 error reading package index file /usr/share/tcl8.4/stc2.0 
/pkgIndex.tcl:      
bad option "join/users/ask/Spirent_TestCenter_4.57
/Spirent_TestCenter_Application_Linux": 
must be atime, attributes, channels, copy, delete, dirname, executable,   
exists, extension, isdirectory, isfile, join, link, lstat, mtime, mkdir,  
nativename, normalize, owned, pathtype, readable, readlink, rename,   
rootname, separator, size, split, stat, system, tail, type, volumes, or 
writable

我不得不将Spirent TestCenter应用程序从4.61降级到4.57,并相应地更改了包索引文件。当它是4.61时,没有这个错误。

1 个答案:

答案 0 :(得分:2)

我猜测文件/users/ask/Spirent_TestCenter_4.57/Spirent_TestCenter_Application_Linux/pkgIndex.tcl中的关键位置缺少空格。猜猜文件中的内容有点难,但可能就像:

package ifneeded stc 4.57 [list source [file join$dir something...]]

问题是join$dir之间缺少空格。可能$dir将被文字路径替换,它可能位于list load或任意数量的其他选项中,但错误是缺少的空间。缺少的空间导致路径被添加到子命令名称(join),并且file命令以这种特有的方式正确地抱怨它。

pkgIndex.tcl文件可能很短。你不应该花很长时间才能发现问题所在,因为你知道自己在寻找什么。

更深层次的原因不太清楚。这可能是安装过程中路径更换的问题,或代表思博伦进行的草率测试(虽然我不会指望;即使是最粗略的测试也应该发现这个问题),或其他任何事情。< / p>

相关问题