问题一:
When configured, ns found the right version of tclsh in /usr/bin/tclsh8.6
but it doesn't seem to be there anymore, so ns will fall back on running the first tclsh in your path. The wrong version of tclsh may break the test suites. Reconfigure and rebuild ns if this is a problem.
解决办法:
sudo apt install tclsh
问题二,在ns2中对/ns/ns-2.35中的makefile文件进行编译命令行出现一下情况:
/bin/sh: cannot create gen/ns_tcl.cc: Permission deniederror writing "stdout": broken pipewhile executing"puts "### tcl-expand.tcl: begin expanding $name""(procedure "expand_file" line 2)invoked from within"expand_file [file tail $name]"("foreach" body line 5)invoked from within"foreach name $argv {set dirname [file dirname $name]if {$dirname != "."} {cd $dirnameexpand_file [file tail $name]cd $startupDir} else ..."(file "bin/tcl-expand.tcl" line 65)make: *** [gen/ns_tcl.cc] error2
可能权限不够,无法对makefile文件进行编译。
进入root模式,在makefile文件的所在的文件夹下使用chmod 777 Makefile 命令来修改makefile权限,然后重新编译。
解决办法:
cd NS2/ns-allinone-2.35/ns-2.35su rootchmod 777 Makefile
问题三,如何添加添加mUDP、mUdpSink和mTcpSink模块
解决方法:
https://www.cnblogs.com/helloWaston/p/4549735.html
https://blog.csdn.net/happyeveryday62/article/details/103335567
实验23问题解决
./setdest -v 1 -n 100 -p 100.0 -M 10.0 -t 100 -x 300 -y 300 > scen_100n_100p_10M_100t_300_300
【NS2】添加mUDP、mUdpSink和mTcpSink模块 - HelloWaston - 博客园根据柯老师的教材可知,mUDP是UDP的延伸,除了具有UDP的功能外,还能记录所发送的包的信息。mUdpSink可以把接收到的包的信息记录 到文件中。mTcpSink是TCPsink的延伸,除了具有Thttps://www.cnblogs.com/helloWaston/p/4549735.html
调试运行ns2 lab22.tcl中遇到的问题_Onwaier的博客-CSDN博客https://blog.csdn.net/happyeveryday62/article/details/103335567