HOW TO install nam for ns2 on debian

2023-05-16

Debian is convinent to install software packages for the tool aptl. Like many other packages ,we can use “apt-get install ns2″ to install the ns2.

Another package nam can be installed in the same way like “apt-get install nam”,but it can not work correctly.The error message is like

random() called in nam
Random is not portable, please use Random::uniform()instead.

It is necessary to edit the source code and reinstall the package.So we can get the source code from the debian server through “apt-get source nam”. Here ,maybe you have to install the dpkg-dev.

Using grep random/(/) *.cc, we can find the definition of the function random() in random.cc. We should modify it like this,just like the error message have reffered.


random()

{
return (long)Random::uniform();
/*printf("random() called in ns./nRandom is not portable, please use Random::uniform() instead./n");
abort();*/
}
/* It is borrowed from L.Wood at http://www.isi.edu/nsnam/archive/ns-users/webarch/1999/msg02165.html

After the modification is finished ,we should configure the code use “./configure”. Unfortrunately, we get another several errors. Now read the error message carefully,we discovered that we should install several packages ” tcl8.5-dev;tk8.5-dev;libotcl1-dev;tclcl-dev”.

Then “./configure” again ,we can finish it smoothly.After the command “make” and “make install “,the nam package can be installed succesfully.

It is useful to copy the nam file which located in /usr/local/bin/ to /usr/bin/ in order to use the nam command directly and globally.

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

HOW TO install nam for ns2 on debian 的相关文章

随机推荐

  • 为什么C++支持重载而C语言不支持重载

    一个函数在C 43 43 中能够被重载 xff0c 但是在C语言确不能被重载的 xff0c 是由于函数名在内存中存储方式不同所导致的 C语言 例如在C语言中 xff0c 有以下三个函数 xff0c 只给声明不给定义 xff01 span c
  • 2020-08-07

    上拉电阻 画红框标记的就是上拉电阻 概念 xff1a 上拉电阻的概念就是一端连接电源正极 xff0c 一端连接到输出口 xff0c 如果没有这个电阻 xff0c 那么电源和输出口就没有直接连接关系 它的作用如上图 xff0c 它可以避免I
  • extern "C" 含义

    extern 34 C 34 含义 extern 34 C 34 被 extern 限定的函数或变量是 extern 类型的 被 extern 34 C 34 修饰的变量和函数是按照 C 语言方式编译和链接的 extern 34 C 34
  • 77. Combinations

    Given two integers n and k return all possible combinations of k numbers out of 1 n For example If n 61 4 and k 61 2 a s
  • 基于STM32的串口通讯

    基于STM32的串口通讯 设备之间通信的方式 串行通信一般是以帧格式传输数据 xff0c 即一帧一帧的传输 xff0c 每一帧都含有起始信号 xff0c 数据信息以及停止信息等 并行通信 数据各个位同时传输 xff0c 速度快 xff0c
  • C语言的艺术之——头文件

    好记性不如烂笔头o o 系列的文章 xff1a C语言的艺术之 头文件 C语言的艺术之 函数 C语言的艺术之 标识符命令与定义 C语言的艺术之 变量 C语言的艺术之 注释 C语言的艺术之 排版与格式 C语言的艺术之 安全性 编码原则 xff
  • 图像高斯分布生成

    给定一些标记点的坐标 xff0c 希望生成其在图像中的高斯分布图 首先 xff0c 上公式 xff1a 不造怎么上公式 嗯稍后学习学习再补充 span class hljs keyword import span numpy span cl
  • 编译原理----词法分析设计

    程序设计实验1 词法分析 一 实验目的 xff1a 通过设计编制调试一个具体的词法分析程序 xff0c 加深对词法分析原理的理解 并掌握在对程序设计语言源程序进行扫描过程中将其分解为各类单词的词法分析方法 二 实验内容 编制一个单词获取程序
  • wwwwwwwwwwwwwwwwwww

    wwwwwwwwwwwwwwwwwwwww
  • C++成员变量的初始化

    类对象的构造顺序是这样的 xff1a 1 分配内存 xff0c 调用构造函数时 xff0c 隐式 xff0f 显示的初始化各数据成员 2 进入构造函数后在构造函数中执行一般计算 1 类里面的任何成员变量在定义时是不能初始化的 2 一般的数据
  • 【BUG解决】使用body-parser失效的实例解决

    前言 最近在使用express框架写Node代码 xff0c 遇到一个问题使用body parser模块失效 整整困在这里一天时间 xff01 xff01 xff01 res send req body 返回结果一直为空 但是代码的书写又看
  • BOCHS问题总结篇

    在官网上下载的bochs 2 4 5 win32版 bochs启动时会读bochsrc bxrc里的配置 xff0c 而bochsrc sample txt则是个sample xff0c 可以在这个sample里阅读相关参数的设置 1 RO
  • 关于Access的左连接

    这篇随笔没有什么深奥的技术要讨论 xff0c 只是自己一个知识上的盲点 xff1a 不知道在Access中如何进行左连接的操作 通过在网上搜索 xff0c 最后在CSDN上找到了自己要的答案 xff0c 因此觉得有必要记录下来 xff1a
  • ubuntu下安装Calibre

    Calibre是电子书管理软件 xff0c 支持Amazon Apple Bookeen Ectaco Endless Ideas Google HTC Hanlin Song设备及格式 xff0c 功能十分强大 ubuntu 有很多包都可
  • 编译Linux内核数

    本文是参考了网上多篇帖子而写的算不上什么原创 唯一值得欣慰的只不过在本机上实现罢了 因为毕竟失败了几次 也因为本人是初学驱动编程 很多简单的问题在我来说是相当的困难的 望有识之士不要笑话 最后 xff0c 希望本文能给刚学驱动而还没开头的人
  • 构造内核源码树

    编写驱动程序时 xff0c 需要内核源码树的支持 内核源码树时从内核源代码编译得到的 下面开始构造内核源代码的步骤 以Ubuntu为例子 1 下载内源代码 xff0c 位置www kernel org 注意 xff1a 源码树内核的版本要和
  • 裁剪图像中感兴趣区域python

    题外话 xff1a 比较全面的缩略图及相应源码 http matplotlib org gallery html http www cnblogs com wei li archive 2012 05 23 2506940 html 题外外
  • Linux设备驱动程序(LDD)中snull的编译问题

    对LDD中snull程序 xff0c 编译的时候会有许多问题 xff0c 鉴于网上还没有合适的解决办法 xff0c 做此总结 xff0c 整理知识 本文在debian6 0上运行通过 xff0c 内核版本为2 6 32 学习LDD中网络驱动
  • 认识(大端--小端)端模式

    span style color 000000 端模式 xff08 Endian xff09 的这个词出自Jonathan Swift书写的 格列佛游记 这本书根据将鸡蛋敲开的方法不同将所有的人分为两类 xff0c 从圆头开始将鸡蛋敲开的人
  • HOW TO install nam for ns2 on debian

    Debian is convinent to install software packages for the tool aptl Like many other packages we can use apt get install n