ubuntu中的NS2编译错误

gcc-4.4 -c -g -O2 -DNDEBUG -DUSE_SHM -DHAVE_UNISTD_H=1 -I. -I/home/akhil/ns-allinone-2.35/include -I/home/akhil/ns-allinone-2.35/include -I/home/akhil/ns-allinone-2.35/include -I/include otcl.c make: gcc-4.4: Command not found Makefile:91: recipe for target 'libotcl.a' failed make: *** [libotcl.a] Error 127 otcl-1.14 make failed! Exiting ... See http://www.isi.edu/nsnam/ns/ns-problems.html for problems 

当你想添加一个额外的协议时,“ns2”通常是从源代码构建的。 所有约300个补丁(额外协议) https://drive.google.com/drive/folders/0B7S255p3kFXNZ2lWZDBRSW40Q00?usp=sharing

‘ns-2.35’Ubuntu 17.10示例: sudo apt install g++-5 →即不迟于g ++ – 5(<= 5.4)可以使用。 注意:您可以同时安装任意数量的gcc版本。

 tar xvf ns-allinone-2.35_gcc5.tar.gz // 2014 - 2017 update → → 

→ https://drive.google.com/file/d/0B7S255p3kFXNVVlxR0ZNRGVORjQ/view?usp=sharing

 cd ns-allinone-2.35/ export CC=gcc-5 CXX=g++-5 && ./install // if Ubuntu 16.04, the build command is './install' only cd ns-2.35/ sudo make install 

~2500模拟https://drive.google.com/drive/folders/0B7S255p3kFXNSmRYb2lGcDRUdWs?usp=sharing

它是打包的。 打包意味着您不需要编译它。 存储库中有2.35版本 。

只需运行sudo apt-get install ns2

采取规则首先搜索二进制包,Snaps,Flatpaks,并且只有在找不到它们时 – 编译。