晚上運作ns2時,出現以下錯誤:
[email protected]:/home/squirrel2/ns-allinone-2.34/ns-2.34/tcl/ex# Can't find a usable init.tcl in the following directories:
:/home/squirrel2/ns-allinone-2.34/tcl8.4.18/library /home/squirrel2/ns-allinone-2.35/lib/tcl8.5 ./lib/tcl8.5 ./lib/tcl8.5 ./library ./library ./tcl8.5.10/library ./tcl8.5.10/library
This probably means that Tcl wasn't installed properly.
檢視了配置的環境變量也沒錯,于是谷歌一下,找到正确方法,原貼位址在此
方法是:
I faced the same problem during my last installation of ns2.35 in ubuntu 11.04.
After I install ns2.35, got message of successful installation of ns. Then I set path in /.bashrc. Then I gave ns command which gave me same error which you got.
The problem is because, ns executable is also at /usr which is conflicting.
Solution:
1. Go to location root-usr-local-bin by giving following command in terminal
cd /usr/local/bin
2. There you would find the ns file. We just need to remove it by giving following command
rm ns
3. Thats it, you are done. Now your ns starts running successfully.
Happy Learning.....
打開/usr/local/bin的檔案果然發現一個名為ns2的檔案,rm删除,然後重新運作ns代碼狀況消除。