NS2安装过程中环境变量设置的问题(ns-2.35)
2017-04-11 10:04
471 查看
nam: Can't find a usable tk.tcl in the following directories: */ns-allinone-2.35/tcl8.5.10/library/tk8.5 */ns-allinone-2.35/tcl8.5.10/tk8.5 ./lib/tk8.5 */ns-allinone-2.35/lib/tk8.5 ./library */ns-allinone-2.35/lib/tk8.5/tk.tcl: wrong # args: should be "::source fileName" wrong # args: should be "::source fileName" while executing "::source -encoding utf-8 */ns-allinone-2.35/lib/tk8.5/msgs/en.msg" ("uplevel" body line 1) invoked from within "uplevel 1 [list ::source -encoding utf-8 $langfile]" (procedure "::msgcat::mcload" line 10) invoked from within "::msgcat::mcload [file join $::tk_library msgs]" (in namespace eval "::tk::msgcat" script line 23) invoked from within "namespace eval msgcat { namespace export mc mcmax if {[interp issafe] || [catch {package require msgcat}]} { # The msgcat package..." (in namespace eval "::tk" script line 3) invoked from within "namespace eval ::tk { # Set up the msgcat commands namespace eval msgcat { namespace export mc mcmax if {[interp issafe] || [catch {p..." (file "*/ns-allinone-2.35/lib/tk8.5/tk.tcl" line 21) invoked from within "source.orig */ns-allinone-2.35/lib/tk8.5/tk.tcl" ("uplevel" body line 1) invoked from within "uplevel source.orig [list $fileName]" invoked from within "if [$instance_ is_http_url $fileName] { set buffer [$instance_ read_url $fileName] uplevel eval $buffer } else { uplevel source.orig [list $fileName] ..." (procedure "source" line 8) invoked from within "source */ns-allinone-2.35/lib/tk8.5/tk.tcl" ("uplevel" body line 1) invoked from within "uplevel #0 [list source $file]"
在安装ns2的过程中遇到这个错误,在查找了很多资料后才找到解决问题的办法:
在TCL_LIBRARY中添加值$NS_HOME/ns-allinone-2.35/tk8.5.10/library
即修改TCL_LIBRARY为TCL_LIBRARY=$NS_HOME/ns-allinone-2.35/tcl8.5.10/library:$NS_HOME/ns-allinone-2.35/tk8.5.10/library
然后source ~/.bashrc
其中$NS_HOME是ns2的路径
下面附带我的环境变量设置:
export NS_HOME=/data/ns2/ns-allinone-2.3.5 export PATH=$NS_HOME/bin:$NS_HOME/tcl8.5.10/unix:$NS_HOME/tk8.5.10/unix:$PATH export LD_LIBRARY_PATH=$NS_HOME/otcl-1.14:$NS_HOME/lib export TCL_LIBRARY=$NS_HOME/tcl8.5.10/library:$NS_HOME/tk8.5.10/library
相关文章推荐
- node及npm安装过程中的win环境变量设置
- npm安装过程中的win环境变量设置
- 安装Tomcat,过程中需要配置的环境变量及遇到的问题
- Linux编译安装软件过程中环境变量的设置
- Ubuntu下的jdk5.0安装过程和jdk环境变量的设置
- linux安装jdk,设置环境变量遇到的一个奇葩问题
- arm-linux-gcc安装过程及环境变量设置方法汇总
- 在Linux下Jdk的安装和Java环境变量的设置
- 在Linux下Jdk的安装和Java环境变量的设置[转载]
- java开发过程中环境变量的设置.
- java初学碰到的两个问题:win xp下环境变量设置细节 和 变量的初始化问题
- “SET 命令设置的环境变量在 FOR 循环中始终为空”问题的原因与解决方法
- java环境变量设置和问题及解决方法
- 安装cygwin+ns-2 过程中home路径问题
- busybox里环境变量设置的问题
- 安装java设置变量的问题----待解决中
- 设置环境变量的问题
- SPS安装过程中配置服务器场帐户设置页面不能正常显示以及IIS中SPS管理站点未配置成功问题的原因
- JAVA编程环境的安装与环境变量的设置
- 安装JDK时环境变量的设置