Ubuntu 中的 NS2 编译错误

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

答案1

当您想要添加额外协议时,“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

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

赶紧跑sudo apt-get install ns2

按照规则首先搜索二进制包、Snaps、Flatpaks,如果未找到则进行编译。

相关内容