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 

NS2安装过程中环境变量设置的问题(ns-2.35)的更多相关文章

  1. Windows7安装JDK的环境变量设置javac不是内部命令或外部命令

    转自:http://bbs.gfan.com/android-5941970-1-1.html Windows7安装JDK的环境变量设置 Windows7 X64安装“jdk-6u26-windows ...

  2. jdk 安装过程配置环境变量 error 的解决过程

    jdk 安装过程配置环境变量 error 的解决过程 问题背景: 我在安装 jdk 过程中在JAVA_HOME和path中添加路径后, cmd 中输入java 和javac均出现错误,因为之前在 D ...

  3. Linux 中环境变量设置

    本文主要整理自以下博文: .bash_profile和.bashrc的什么区别及启动过程 linux环境变量设置方法总结(PATH/LD_LIBRARY_PATH) .bash_profile 和 . ...

  4. 【Mac】-NO.161.Mac.1 -【MacOS 中环境变量设置 zsh: command not found: xxx】

    Style:Mac Series:Java Since:2018-09-10 End:2018-09-10 Total Hours:1 Degree Of Diffculty:5 Degree Of ...

  5. linux中环境变量设置

    Linux下环境变量设置的三种方法: 如想将一个路径加入到$PATH中,可以像下面这样做: 只对当前的shell 起作用的环境变量 1.控制台中设置,不赞成这种方式,因为他只对当前的shell 起作用 ...

  6. eclipse详细安装教程与环境变量设置

    地址:https://blog.csdn.net/q651742112/article/details/73477400 源地址:https://www.cnblogs.com/yeminglong/ ...

  7. ubuntu 12.04中环境变量设置

    Persistent environment variables So far we've only discussed ways set an environment variable value ...

  8. 【Linux】环境变量设置

    在Windows中环境变量设置是非常easy的事情.例如以下图.仅仅要右键我的电脑->高级系统设置->环境变量,选择Path之后,点击"编辑"就能够输入你要加入的内容. ...

  9. win7中java编程工具安装 java环境变量设置

    一.下载java 官方地址:http://www.oracle.com/technetwork/java/javase/downloads/jdk-6u26-download-400750.html ...

随机推荐

  1. 矩阵dp

    矩阵dp 这里是矩阵dp,不是矩阵乘法优化dp. 矩阵上的dp好像也没什么特殊的?大概有一个套路就是从上向下,从左向右进行dp吧. 首先第一道题好像不是矩阵dp... 1005 矩阵取数游戏:http ...

  2. 【转】使用Chrome Frame,彻底解决浏览器兼容问题

    本文转自http://www.ryanbay.com/?p=269,感谢该作者的总结 X-UA-Compatible是自从IE8新加的一个设置,对于IE8以下的浏览器是不识别的. 通过在meta中设置 ...

  3. str操作方法

    s = 'dsj,fhk,je,f' # s1 = s.split(',') # print(s1) s = 'aleX leNb' s1 = s.strip() print(s1) s2 = s[2 ...

  4. Moleskine智能笔+专用本:写完随时传到手机

    http://www.totiot.com/61805.html Moleskine公司生产的速写本和速写板一直是涂鸦爱好者和速记员们的首选.该公司还联合Adobe. Livescribe. Ever ...

  5. docker swarm英文文档学习-10-使用Docker密钥管理敏感数据

    Manage sensitive data with Docker secrets使用Docker secrets管理敏感数据 About secrets 对于Docker Swarm服务来说,sec ...

  6. ORACLE创建用户,表空间,并且导出数据,导出表

    1.创建用户: create user toptea2 identified by "用户名" 2.给用户授权 grant create session to 用户名; grant ...

  7. Android调用系统的发邮件功能

    package com.example.myapi.email; import java.util.ArrayList; import java.util.List; import android.c ...

  8. Unable to start a VM due to insufficient capacity

    今天cloudstack中的一个普通用户创建虚拟机时,总是报错:Unable to start a VM due to insufficient capacity ,看management and a ...

  9. day05今日学习总结:字符串类型

    昨日学习复习: 数据类型: 有序.无序 有序:可以根据索引查找的数据 可变不可变 可变:在值变的情况下,id不变,证明原值是在改变的 不可变:在值变的情况下,id也跟着变,证明不是在改原值. 今日学习 ...

  10. C语言各种数据类型取值范围

    速查表: char -128 ~ +127 1Byte -2^7 ~ 2^7-1 unsigned char 0 ~ 255 1Byte 0 ~ 2^8-1 short -32767 ~ + 3276 ...