1. Download the required OMNet++ version
2. Unzip the downloaded omnet package and find the installation tutorial
Decompression method: You can right-click the mouse and select Extract here; you can also use the command line to decompress in the terminal.
The installation tutorial is at: omnetpp-5.6.2-src-linux/omnetpp-5.6.2/doc/InstallGuide.pdf
3. Install dependent libraries
Use Ctrl+Alt+T on the Ubuntu interface to open the terminal and execute the following commands in sequence (you can also
Find Chapter 5 in the pdf file and copy it)
sudo apt-get update
sudo apt-get install build-essential gcc g++ bison flex perl \
python python3 qt5-default libqt5opengl5-dev tcl-dev tk-dev \
libxml2-dev zlib1g-dev default-jre doxygen graphviz libwebkitgtk-3.0-0
sudo apt-get install openscenegraph-plugin-osgearth libosgearth-dev
sudo apt-get install openmpi-bin libopenmpi-dev
sudo apt-get install libpcap-dev
When encountering (Do you want to continue? [Y/N]), answer Y.
4. Configure the environment and install omnet
(1) Enter the omnetpp-5.6.2 folder, Ctrl+Alt+T to open the terminal and run
. setenv
(2) Run
sudo gedit ~/.bashrc
Add a line of instructions at the end of the file that appears (marked in yellow in the image below). Among them, export PATH=$PATH: followed by the path of your own bin (here is mine, you can open the terminal under the omnetpp+5.6.2/bin folder, enter pwd to find your own path, and then copy it to export PATH=$PATH: later, then save)
(3) Run
source ~/.bashrc
./configure
make
When the following interface appears, your omnet is successfully installed!
5. Set desktop icons
make install-menu-item
make install-desktop-icon
6. Finally, you can run the tictoc routine that comes with omnet
Open omnet, install the INET architecture, and you can run happily after completion.
7. Conclusion
I have installed omnet many times, but every time I forget the installation steps. It is a waste of time and I just summarized it. Following the installation process above, I didn't have any problems here. I hope my summary can be useful to you!