Ubuntu 12.04安装ns nam记录

Ubuntu 12.04安装ns nam记录

使用apt工具安装nam后执行时总是出现段错误,就把ns,nam全部remove后重新用源码安装.
源码下载地址:
1. https://nchc.dl.sourceforge.net/project/nsnam/allinone/ns-allinone-2.35/ns-allinone-2.35.tar.gz
2. https://nchc.dl.sourceforge.net/project/nsnam/nam-1/1.15/nam-src-1.15.tar.gz

首先安装ns,再安装nam.
ns安装教程可参考这个链接
http://www.linuxdiyf.com/linux/16007.html
需要注意的是一个编译错误解决方法

linkstate/ls.h:137:20: note: use ‘this->erase’ instead
make: * [linkstate/ls.o] Error 1

修改ls文件:ns-2.35/linkstate/ls.h第137行
void eraseAll() { erase(baseMap::begin(),baseMap::end()); }

改为:void eraseAll() { this->erase(baseMap::begin(),baseMap::end()); }
保存后 sudo ./install #重新安装顺利完成

ns安装完成 之后,再安装nam.
需要注意的问题有:

  1. xwd.c:87:29: Fatal error: X11/Xmu/WinUtil.h: No such file or directory

    解法方法:check existence of /usr/include/X11/Xmu/ . If does not exist,run this as root:
    apt-get install libxmu-headers
    来自 https://sourceforge.net/p/nsnam/bugs/76/

  2. undefined reference to `gzopen’ ……

    解法方法修改nam目录下的Makefile,添加-lz
    LIB = \
    -L/home/hct/ns-allinone-2.31/tclcl-1.19 -ltclcl -L/home/hct/ns-allinone-2.31/otcl -lotcl -L/home/hct/ns-allinone-2.31/lib -ltk8.4 -L/home/hct/ns-allinone-2.31/lib -ltcl8.4 -lz \
    再make sudo make install
    参考来自http://www.cnblogs.com/buptmuye/archive/2013/11/30/3451753.html

  3. configure参数注意要正确:

    ./ configure –with-tcl=/home/xxx/ns-allinone-2.35/tcl8.5.10 –with-tcl-ver=8.5.10 –with-tk=/home/xxx/ns-allinone-2.35/tk8.5.10 –with-tk-ver=8.5.10 –with-otcl=/home/xxx/ns-allinone-2.35/otcl –with-tclcl=/home/xxx/ns-allinone-2.35/tclcl

相关文章

目录前言一、创建Hadoop用户二、更新apt和安装Vim编辑器三、...
原文连接:https://www.cnblogs.com/yasmi/p/5192694.html ...
电脑重启后,打开VirtualBox,发现一直用的虚拟机莫名的消失...
参见:https://blog.csdn.net/weixin_38883338/article/deta...
Ubuntu 18.04 LTS 已切换到 Netplan 来配置网络接口。Netpla...
介绍每个 Web 服务都可以通过特定的 URL 在 Internet 上访问...