How to Install Omnet++ in Ubuntu 8.04
OMNeT++ is a public-source, component-based, modular and open-architecture simulation environment with strong GUI support and an embeddable simulation kernel.
I have install omnet++ in my pc and also in my laptop. Both with same version of ubuntu 8.04 but with different errors when compiling the source. Upon success, you can run the samples using ./rundemo command and below window will pop up nicely.

Here are the steps :
1. Download the simulator archive from omnetpp.org
2. sudo tar zxf omnetpp-3.4b2-src.tgz -C /usr/local/ ; cd /usr/local ; sudo ln -s omnetpp-3.4b2 omnetpp
3. sudo apt-get install bison flex blt lmodern giftrans doxygen libxml2-dev graphviz imagemagick
4. sudo apt-get install tcl8.4 tk8.4 tcl8.4-dev tk8.4-dev
5. export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/omnetpp/lib
6. export TCL_LIBRARY=/usr/share/tcltk/tcl8.4
7. export PATH=$PATH:/usr/local/omnetpp/bin
8. cd /usr/local/omnetpp;sudo ./configure;
9. sudo make
(Step 5,6,7 may be added into ~/.bashrc for future convenience. Remember to remove the word export!)
Following all those step should be no problem. It will be a problem once you in step 9 where compiler will be complaint about some command not found. Example :
opp_msgc -Xnc -Xns sim_std.msg
make[1]: opp_msgc: Command not found
Solution :
10. sudo -i
11. cd /usr/local/omnetpp;export PATH=$PATH:/usr/local/omnetpp/bin
12. make
I have successfully install omnet++ using the steps mention above but when installing it in my pc,i have error: Standard C Math Library not found when running steps 8.
Solution: sudo apt-get install build-essential
Well, that’s all. enjoy your omnet++
Credit to blog.chinaunix.net
Powered by Bleezer
20 Responses to “How to Install Omnet++ in Ubuntu 8.04”
By wanmus on May 11, 2008 | Reply
Salam boh..ape criter? maaflah..ambo nih kureng skit omputih ni..hehehe..
Ape2pun..nice to meet you semalam..
By arejae on May 12, 2008 | Reply
ambo pun kure gok cik wey weh english nie.bahang rambang jer..ekeke…..hopefully buleh lar improve. tapi napok pesen macey dok improve jugok.hahaha…..
nice to meet you too deh.Insya-Allah…semoga saing-saing sahabat semua mendapat kejayaan.
By oryzana on Jul 7, 2008 | Reply
can you do the tutorial on how to install the suite for omnet IPv6SuiteWithINET-20060119 on ubuntu?
I have the windows version without IPv6SuiteWithINET-20060119 on :
http://omnet-installation.blogspot.com
Tried install IPv6SuiteWithINET-20060119 on windows but failed.Maybe you can help to install it on ubuntu…
By Franco... on Jul 20, 2008 | Reply
Nice post. Unfortunately, Omnet team is migrating its webserver, and it is impossible to download omnet’s tar from there. Is there any possibility you send me your local copy?
Thanks…
By arejae on Jul 22, 2008 | Reply
Hi Franco,thanks. hmm..I can’t find my tar source that i download previously.
anyway,I just create it again using my current folder but i’m not sure if it is ok to use it.
If you like, you can download it here.
http://www.arejae.com/blog/?download=omnetpp-3.4b2
..and kindly let me know the result yeah.
thanks to you too.
By Rana on Sep 3, 2008 | Reply
Hi, The instructions are really helpful.
However My ubuntu installation 8.04 fails to recognize the package “lmodern”.. Searching on internet didn’t help either.
Looking forward to feedback
Regards
By arejae on Sep 3, 2008 | Reply
Hi Rana,
frankly, I also not sure how to solve this because i am not encounter this problem previously.
maybe you can try below command in order:
1. sudo apt-get install tex-common
2. sudo apt-get install lmodern
let me know yeah.
By manuhalo on Sep 18, 2008 | Reply
Hi,
Thanks for the help but I had quite a lot of troubles. First of all I had to manually download and compile blt because omnet’s configure script wouldn’t find it despite it being installed with apt-get. Then I’m having warnings for not setting properly the environmental variables needed, although I added the suggested lines both in ~/.bashrc, ~/.bash_profile and even /etc/environment (tried both with and without the export keyword). In the end the only thing that worked was launching manually the commands as root (with sudo -i). Don’t know much about bashrc and environmental variables in linux, tried to do some research but couldn’t solve the problem. Anyhow I hope this is useful to someone else
By arejae on Sep 20, 2008 | Reply
hi there manuhalo, thanks for visit. So i think now you can run the demo without a problem right ? I also have those warning when I install omnet in my friend laptop, but I still manage to run the demo.
good luck.
By GHOUOL on Nov 27, 2008 | Reply
Dear
in very files I added stdlib.h and string.h as an include to dismiss errors in compiling. did I miss anything in installation or this is normal?
By oryzana on Jan 23, 2009 | Reply
just want your opinion on which is the best.. between fedora and ubuntu? I just got my free ubuntu cd. but now i’m confused whether to install omnet on fedora or ubuntu..
oryzana´s last blog post..Free antivirus review – 2009
By oryzana on Jan 23, 2009 | Reply
one more thing..can ubuntu works on virtual machine?
oryzana´s last blog post..Free antivirus review – 2009
By khai on Feb 7, 2009 | Reply
arejae,
kamu mmg terer gne omnet ke..
sy ni baru je nk blaja kene wat final year project..
please give me some advice..
thanks..
By arejae on Feb 7, 2009 | Reply
@zana:sorry lama tak jengok kat sini. bz giler skang. if you were to ask me..my answer is just go for ubuntu lah.tehnically ubuntu can works with virtual pc but i myself not yet to try it lah.
@khai: saya tak terror guna omnet.setakat install and try few things boleh ler. i would suggest you try tanya oryzana tuh.it happen dia pun buat project using omnet gaks.
By kahi on Feb 18, 2009 | Reply
owh..
saya tgh try2 gak ns2 coz tutorial pun byk..
penin2.. :0
By beginer on Apr 10, 2009 | Reply
thanks your help!I’m suceed in setting up,too.
By hanin on Aug 9, 2009 | Reply
please i need ur help im doing my final year project and its about ipv6 simulation i downloaded omnet++ but i didnt fined the setup folder ,,anyone can help me and let me now the steps of simulating ipv6 using omnet++ ??
By anonymous on Sep 13, 2009 | Reply
Hi Thanks alot. Your step by step instructions were perfect and worked really well. Got a few problems but resolved by getting the latest sources.list.
Thanks again!!
By mns on Nov 29, 2009 | Reply
Hello,
I followed your steps. But in step 8, when i typed “sudo ./configure” it raised an error:
“Application initialization failed: no display name and no $DISPLAY environment variable
configure: error: Cannot run wish (wish command “puts OK; exit” failed): maybe you are not running X or DISPLAY environment variable not set?”
Can anyone help me to fix this problem??? im so confusing now with this problem
Thank in advance.
mns
By mar on Dec 20, 2009 | Reply
im following ur step but im stuck with ur step 2..when i run the command, they said that the files is not in the directory and cannot find archieve..wut does it mean??plz help me..how to solve this prob??