黄罗毅分享 http://blog.sciencenet.cn/u/huangluoyi 交通信息工程及控制,车路协同, 车联网 www.huangluoyi.com

博文

NCTUns 5.0 安装成功

已有 11560 次阅读 2010-3-20 21:13 |个人分类:点滴|系统分类:科研笔记| 仿真, NCTUns, Fodera, VMware

NCTUns 5.0 安装成功

 

毕业论文需要做IEEE 802.11p的仿真,选择了NS-2NCTUns作为工具,在安装NCTUns时出现和解决了一些问题,终于于2010320日正式装好NCTUns软件,安装过程颇为心酸,特撰此文留念。

315日,初步打算使用Windows XP+Ubuntu 9.10+ VMware 6.02+NCTUns 6.0安装,然而经过3天的折腾后,发现遇到的问题越来越多,到NCTUns官方论坛上荡了一圈,发现遇到同样问题的同志们不在少数,毅然于2010318日转战Fedora 10,大家可以从Fedora的官方网站上下载iso镜像文件,这里提醒大家,根据自己需要,一定要选对i386x86否则可能导致安装失败!

最终选择了Windows XP+Fedora 10+ VMware 6.02+NCTUns 5.0

首先用VMware6.02安装好Fedora 10,具体步骤大家可参看网上相关教程或给我留言。

安装必备软件包:

如果你的Fedora能联网,就使用类似下面的命令更新包

# yum update

# yum install gcc gcc-c++ make mkinitrd

如果不能联网,请从前述下载的iso镜像文件中(Fedora-10-i386-DVD.iso-3.41G),拷取package中相应的gcc包和gcc-c++包,需要说明的是,如果你想安装NCTUns 6.0,最好使用Fedora 12,否则需要将gcc-c++更新至更高的版本。

拷出相应包后,安装rpm包及相关的依赖包:

#rpm –ivh packagename.rpm

 

本人一共大概安装了readline-devel ncurses-develgccgcc-c++glibc-develglibc-headerskernel-headerslibstdcncurses-develreadline-develrpm-libs等包

 

安装好常用包后,我们就可以着手安装NCTUns

下载 NCTUns5.0-allinone-linux-2.6.27.7-f10.20090709.tar.gz(我好像改过文件名了~),解压缩并运行安装程序:

 

# tar zxvf NCTUns5.0-allinone-linux-2.6.27.7-f10.20090709.tar.gz

# cd NCTUns-5.0/

# sh install.sh

 

大概5-6分钟后,安装完毕,我们重新启动

# reboot

 

重启,选择NCTUns内核,运行 NCTUns 会出现下面问题:

failed to load the logo以及cannot find the file containing the module list的提示

大家注意:这里我们必须以root身份运行

切换到root身份,重新运行NCTUns,熟悉的GUI出现了

 

如果重启后运行 NCTUns出现下面问题:

$ /usr/local/nctuns/bin/nctunsclient

/usr/local/nctuns/bin/nctunsclient.bin: error while loading shared libraries:

libqt-mt.so.3: cannot open shared object file: No such file or directory

则需要修改 .bashrc 配置文件:

$ vi .bashrc

export NCTUNSHOME=/usr/local/nctuns

export NCTUNS_BIN=/usr/local/nctuns/bin

export NCTUNS_TOOLS=/usr/local/nctuns/tools

export LD_LIBRARY_PATH=/usr/local/nctuns/lib

 

提醒大家:以root用户打开run simulation时,GUI所需密码默认是nctuns。请注意区别!

 

(附安装后常见问题:

1How to solve "login failed. please check your username and password" problem

It is because the account/password doesn't match with the user information in the dispatcher setting.

To solve the problem, run the nctunsclient and then goto G_Setting -> Dispatcher.

Under user information, give an ordinary username and its password (the account can't be root).

Of course, the ordinary user account should be previously created in your linux machine.

 

2How to solve "No Idle Server" error

The no idle server shows up may be the reason that the program terminates unexpectedly on the previous simulation.

You can use "ps aux | grep nctuns" to see what programs are still running and then use "killall [ProgramName]" to kill that process.

Example: killall stg

 

3、出现了“Connect to Dispatcher at 127.0.0.1:9800 failed”,

执行Dispatcher,,还要另外开启coordinator才能run simulation,注意,要开三个终端,其中一个开Dispatcher,一个开coordinator,一个执行Nctuns

 

4、以root身份登录fedora 10

编辑/etc/pam.d/gdm,注释或删除:

# auth required pam_succeed_if.so user != root quiet

有时可能还要编辑/etc/pam.d/gdm~注释或删除:

# auth required pam_succeed_if.so user != root quiet

保存文件后,登出GUI后,即可用root登录GUI了。

 

5、安装文件中readme关于环境的设置

Before running all of the NCTUns 5.0 programs, three environment

        variables must be set.

 

        If you install the NCTUns 5.0 package into the default

        /usr/local/nctuns directory, in the following description

        ${where-you-install} should be replaced with /usr/local/nctuns.

 

        NCTUNSHOME should be set to ${where-you-install}, NCTUNS_TOOLS

        should be set to ${where-you-install}/tools, and NCTUNS_BIN

        should be set to ${where-you-install/bin

 

        E.g., if you use tcsh, you can add the following lines to your

        .cshrc shell configuration file

 

            setenv NCTUNSHOME ${where-you-install}

            setenv NCTUNS_TOOLS ${where-you-install}/tools

            setenv NCTUNS_BIN ${where-you-install}/bin

 

        E.g., if you use bash, you can add the following lines to your

        .bashrc shell file

 

            export NCTUNSHOME=${where-you-install}

            export NCTUNS_TOOLS=${where-you-install}/tools

            export NCTUNS_BIN=${where-you-install}/bin

 

         You can also use the ${where-you-install}/etc/nctuns.{csh|bash} to

         help you set all environment variables

 

        E.g., if you use tcsh, you can add the following lines to your

        .cshrc shell configuration file

 

            source ${where-you-install}/etc/nctuns.csh

 

        E.g., if you use bash, you can add the following lines to your

        .bashrc shell configuration file

 

            source ${where-you-install}/etc/nctuns.bash

 

        If you do not add these commands to your .cshrc or .bashrc file,

        you will need to manually set these variables in each opened

        xterm window before executing a NCTUns 5.0 program.

 



https://blog.sciencenet.cn/blog-413947-304721.html

上一篇:IEEE 802.11p 经典参考文献
下一篇:关于big endian和litter endian遇到的问题
收藏 IP: .*| 热度|

0

发表评论 评论 (7 个评论)

数据加载中...
扫一扫,分享此博文

Archiver|手机版|科学网 ( 京ICP备07017567号-12 )

GMT+8, 2024-5-19 13:56

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部