2016-11-28 147 views
0

我在嘗試在自動化中運行測試時出現以下錯誤。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時,這個錯誤不存在。

+0

看起來像一個特定於軟件包的東西。您可能想在思博倫網絡上提出這個問題。 – Jerry

回答

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文件可能很短。現在不應該花很長時間才能發現問題出在哪裏,你知道你在找什麼。


更深層次的原因這不太清楚。這可能是安裝過程中的路徑替換問題,或者是代表思博倫的馬虎測試(儘管我不會指望這一點;即使是最粗略的測試應該可以發現這個問題)或其他任何事情。