在 Ubuntu 下安装 NS2

在 Ubuntu 下安装 NS2

我正在尝试在 Ubuntu 14.04 上安装 NS2。我按照推荐的步骤操作,在这个答案中。但我仍然面临很多错误。

/home/smallko/ns-allinone-2.28/sgb/gb_io.w:576: undefined reference to `_fclose'
collect2: error: ld returned 1 exit status
make: *** [test_io] Error 1
Unable to create sgb library, but it's optional, so continuing...
============================================================
* Build GT-ITM
============================================================
sgb lib not found. gt-itm & sgb2ns could not be installed. Continuing..
============================================================
* Build zlib
============================================================
./install: 382: ./install: ./configure: Permission denied
Zlib-1.1.4 configuration failed, but it's optional, so continuing ...
============================================================
* Build tcl8.4.5
============================================================
make: *** No rule to make target `/home/smallko/ns-allinone-2.28/tcl8.4.5/unix/dltest/Makefile.in', needed by `Makefile'.  Stop.
./install: 409: ./install: ./configure: Permission denied
tcl8.3.2 configuration failed! Exiting ...
Tcl is not part of the ns project.  Please see www.Scriptics.com
to see if they have a fix for your platform.

我尝试了很多次,但还是无法修复此Permission denied错误。还是有其他问题?

答案1

Ubuntu 14.04:libc6、libc6-dev 已“更新”,不再可用于构建旧 ns2。Ubuntu12.04.5可以用于大多数版本。但不适用于包含旧代码的某些补丁/更改。

ns2 通常推荐的操作系统是 CentOS 6.8 - i386http://ftp.funet.fi/pub/mirrors/centos.org/6.8/isos/i386/CentOS-6.8-i386-LiveCD.iso... 除了~4 个补丁需要 64 位操作系统之外。


ns-allinone-2.28、Ubuntu 12.04.5、CentOS 等:

tar xvf ns-allinone-2.28.tar.gz
cd ns-allinone-2.28/
patch -p0 < ns228-gcc41-64_2016-1.patch
export CC=gcc34 CXX=g++34
./install
cd ns-2.28/
sudo make install
cp ns ns228-orig   (This is your backup of the original 'ns')
sudo cp ns228-orig /usr/local/bin/

并且不要向 .bashrc 添加任何 *PATH。这不是必需的。


链接:

ns228 补丁https://drive.google.com/file/d/0B7S255p3kFXNVWpLZFgxNl9SazA/view?usp=sharing

gcc34,Ubuntu 12*,64 位https://drive.google.com/file/d/0B7S255p3kFXNRTkzQnRSNXZ6UVU/view?usp=sharing

g++34,Ubuntu 12*,64 位https://drive.google.com/file/d/0B7S255p3kFXNV3J3bnVoWGNWdG8/view?usp=sharing

北美 64 位https://drive.google.com/file/d/0B7S255p3kFXNNmtLeXhsaG5hXzQ/view?usp=sharing... 所有名称http://www.linuxquestions.org/questions/linux-newbie-8/ns-stop-couldn%27t-execute-nam-permission-denied-while-executing-exec-nam-4175524760/#2

相关内容