【问题标题】:tcl error reading package index filetcl 读取包索引文件时出错
【发布时间】:2016-11-28 07:03:08
【问题描述】:

我在尝试运行自动化测试时遇到以下错误。

 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 时,这个错误是不存在的。

【问题讨论】:

  • 看起来像一个包特定的东西。您可能想在思博伦网络上问这个问题。

标签: tcl


【解决方案1】:

我猜测文件/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 文件可能很短。既然您知道要查找的内容,您应该很快就会发现问题所在。


其中的深层原因不太清楚。这可能是安装期间路径替换的问题,或者代表 Spirent 进行的草率测试(尽管我不希望这样;即使是最粗略的测试也应该发现这个问题),或者其他任何事情。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-04-20
    • 1970-01-01
    • 1970-01-01
    • 2015-10-23
    • 1970-01-01
    相关资源
    最近更新 更多