Thursday, March 4, 2010

How to install omnet++ on ubuntu 8.04

From

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

No comments: