免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1383 | 回复: 0
打印 上一主题 下一主题

Ubuntu下安装Omnet++3.3 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-12-17 17:19 |只看该作者 |倒序浏览

在牛哥的帮忙下,终于在Ubuntu8.04版本下安装成功了Omnet++3.3
下面对安装中重要步骤作一个简单说明:
注意很重要的一点:
由于安装Omnet++过程中需要root的访问权限,所以需要使用root用户登录Ubuntu
root登录方法:
一、启用root用户登录:
   1.重新配置 root 的密码:
  $sudo passwd root  #按照提示输入两次新的密码,并加以确认。
  2.启用root用户登录:
  $sudo vi /etc/X11/gdm/gdm.conf #打开gnome的配置文档,在末行模式中输入:AllowRoot回车,找到AllowRoot=false ,把false改为true,保存后退出。
  之后,重启系统时,就能够用 root 登录了。假如您想要禁用 root 帐号,则执行下列命令:
  $sudo passwd -l root
二、Ubuntu 中的 root 帐号默认是被禁用了的。
   在 Ubuntu 中激活 root 帐号的过程如下:
  1. 在终端执行 sudo passwd root 指令后,系统将会提示您配置一个新的 root 帐号密码。
  2. 点击 System -> Preferences -> Login Window 菜单,并转换到 Security 选项页,然后选中其下的“Allow local system administrator login”选项。
执行上述两步后,您便能够使用 root 帐号登录 Ubuntu 系统了。
假如要再次禁用 root 帐号,那么能够执行 sudo passwd -l root。
三、假如一直想一直用root也能够"sudo -s"。
四、使用$ su 切换root用户
下面开始进行Omnet++的安装
一、下载omnetpp-3.3-src.tgz,官方网址:http://www.omnetpp.org/
    将其解压到/opt
#tar -C /opt -zxvf omnetpp-3.3-src.tgz
二、下载tcl/tk,官方网址:http://www.tcl.tk/
    如果下载不成功,可以使用Ubuntu的包安装命令
#apt-get install tcl/tk
三、进入Omnet目录下
#cd /opt/omnetpp-3.3
    运行 #./configure,只有会提示如下内容:
# ./configure
...
WARNING: The configuration script could not detect the following packages:

    MPI (optional)  LibXML/Expat  Akaroa (optional)

Scroll up to see the warning messages (use shift+PgUp key), and see config.log
for more details. While you can use OMNeT++/OMNEST in the current
configuration, please be aware that some functionality may be unavailable
or incomplete.
...
上面的Warning内容提示有一些需要的安装包还没有安装
使用命令安装 #apt-get install ~~~~
只有再运行 #./configure,会提示如下内容:
$ ./configure
...
WARNING: your PATH doesn't contain /home/dhinton/dev/3rdparty/omnetpp/bin!
Add the following line to your startup file:
  export PATH=$PATH:/opt/omnetpp-3.3/bin  # .(bash_)profile if you use sh/bash
  setenv PATH=$PATH:/opt/omnetpp-3.3/bin  # .cshrc if you use csh,tcsh etc.

WARNING: You selected shared libraries in configure.user, but your
LD_LIBRARY_PATH doesn't seem to contain /home/dhinton/dev/3rdparty/omnetpp/lib!

Add the corresponding line to your startup file:
  export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/omnetpp-3.3/lib
         # into .(bash_)profile if you use bash or other sh-like shell
  setenv LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/omnetpp-3.3/lib
         # into .cshrc if you use tcsh or other csh-like shell

WARNING: The TCL_LIBRARY environment variable is not set, and without it
OMNEST/OMNeT++ GUI programs may be unable to find the BLT library.
Please set it to point to the following directory:
    /usr/local/lib/tcl8.4

Add the corresponding line to your startup file:
  export TCL_LIBRARY=/usr/share/tcltk/tcl8.4
         # into .(bash_)profile if you use bash or other sh-like shell
  setenv TCL_LIBRARY=/usr/share/tcltk/tcl8.4
         # into .cshrc if you use tcsh or other csh-like shell
上面的Warning提示我们进行路径设置:
执行命令: #gedit ~/.bashrc 添加下面内容:
export PATH=$PATH:/opt/omnetpp-3.3/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/omnetpp-3.3/lib
export TCL_LIBRARY=/usr/share/tcltk/tcl8.4
设置:configure.user
首先执行 #locate tcl84 tk84 找到tcl和tk的位置。
执行命令: #gedit configure.user 添加下面内容:
TK_CFLAGS="-I/usr/include -I/usr/X11R6/include -I/usr/include/tk8.4 -I/usr/include/tcl8.4"
  TK_LIBS="-L/usr/X11R6/lib -l X11 -L/usr/local/lib -ltk84 -ltcl84"
上面步骤完成了Omnet的安装设置
执行下面命令
./configure
  make完成安装:)


本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u2/88804/showart_1725419.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP