zoukankan      html  css  js  c++  java
  • NS2安装过程中环境变量设置的问题(ns-2.35)

    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 
  • 相关阅读:
    htnl5中设置文本单行显示,超出部分打省略号,鼠标移到文本时alt出全部文本内容
    sql 查出一张表中重复的所有记录数据
    JS实现关闭当前子窗口,刷新父窗口
    jstl <c:forEach> 介绍
    Oracle SQL: TO_CHAR and TO_NUMBER 笔记
    Python学习记录七---继承、多态和封装
    iOS动画和第三方插件学习网址
    Python学习记录(六)--函数 定义和使用
    python学习记录(五) --语句块和比较符
    Python学习记录(四)--字典
  • 原文地址:https://www.cnblogs.com/songxh-scse/p/6692225.html
Copyright © 2011-2022 走看看