NS2 Execute Error: invalid command name “Agent/LUV” [How to Solve]

1.Error:
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]
…”

 

Solution:
PS: Because I reinstalled ns2, then when I set the environment variables, I repeatedly executed source ~/.bashrc/, but found that the environment variables set did not take effect
Use echo $PATH to check the path, and found that there are duplicate paths
At the command line, enter.

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

Remove duplicate path, re-execute ns XXX.tcl file, success!!!

Similar Posts: