执行ns2报错

1.错误:

LUV configuration file
invalid command name "Agent/LUV"
while executing
"Agent/LUV set sport_ 0"
(file "./luv.tcl" line 2)
invoked from within
"source.orig ./luv.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]
..."

【未解决】(参考博客:https://www.cnblogs.com/zhchngzng/p/3584651.html)

export TCL_LIBRARY=/home/username/Desktop/ns-allinone-2.35/tcl8.5.10/library:/home/username/Desktop/ns-allinone-2.35/tk8.5.10/library

And run "source ~./bashrc" in terminal.

按照上述方法,依旧没有解决

 

!!!【解决】

PS:因为我重装了ns2,然后在设置环境变量的时候,重复执行的source ~/.bashrc/,但是发现设置的环境变量并没有生效

用 echo $PATH查看路径,发现有重复路径

在命令行输入:

export PATH=$(echo $PATH | tr : "\n"| sort | uniq | tr "\n" :)

删除重复路径,重新执行ns XXX.tcl文件,成功!!!1
上一篇:ESXi7.0 磁盘目录下vmkdump文件删除


下一篇:Tungsten Fabric与K8s集成指南丨创建安全策略