毕业设计——Ubuntu安装Omnet++

1. 官网下载Omnet++压缩包,解压到安装文件夹

tar -zxvf omnetpp-5.1.1-src-linux.tgz /opt

2. 运行./configure

  • 报错configure: error: Bison not found, needed to build OMNeT++/OMNEST – please install it!
  • 解决办法:安装bison,安装完成后会提示还需要安装的软件包,因此,可以根据Onmet安装文档,直接将所有依赖的软件包都一起安装,命令如下:
sudo apt-get install build-essential gcc g++ bison flex perl tcl-dev tk-dev blt libxml2-dev zlib1g-dev openjdk-6-jre doxygen graphviz openmpi-bin libopenmpi-dev libpcap-dev

3. 运行./configurte

  • 报错configure: error: Cannot build Qt apps, probably due to missing or too old Qt packages. Make sure Qt development packages are installed and newer than Qt 5.4. You can disable Qtenv by setting the WITH_QTENV variable to “no” in configure.user
  • 解决办法:修改confugure.user文件,将 WITH_QTENV设置为0

  • 报错configure: error: Cannot find OpenSceneGraph - 3D view in Qtenv will not be available. Set WITH_OSG=no in configure.user to disable this feature or install the development package for OpenSceneGraph.

  • 解决办法:sudo apt-get install OpenSceneGraph.

  • 报错configure: error: Cannot find osgEarth. Set WITH_OSGEARTH=no in configure.user to disable this feature or install osgEarth.
    解决办法:sudo apt-get install osgEarth.

  • 注意:后面两个错误不能直接将对应的变量设置为0,否则在make时会报错

4. 运行make报错

  • ERROR: /opt/omnetpp-5.1.1/bin is not in the path! You can add it by entering: export PATH=/opt/omnetpp-5.1.1/bin:$PATH
  • 解决办法:
. setenv 
export PATH=/opt/omnetpp-5.1.1/bin:$PATH
或者修改/etc/profile 使用source /etc/profile命令使其生效

5. 启动omnet++

  • 命令行启动:omnetpp
  • 创建桌面快捷方式
 make install-menu-item
 make install-desktop-icon//如果不把执行的话,使用chmod修改软件的权限

你可能感兴趣的:(毕业设计)