Search code examples
linuxomnet++reinstall

New path for new installation of omnet in linux


There is a problem with PATH variable. Though I added the path to omnet folder I face this error:

ERROR: /home/user/omnetpp-4.2.1/bin is not in the path! You can add it by entering:
   export PATH=/home/user/omnetpp-4.2.1/bin:$PATH

I installed omnet++ 5.0, set the PATH variable and it worked well. Then I needed to install omnet++ 4.2.1. So I added this folder to home, changed the variables PATH and OMNET_DIR from the omnetpp-5.0 (previously working fine omnet) to omnetpp-4.2 (the new one) in the bashrc file.

Then typed sourc ~/.bashrc and tried the new variables by the instructions echo $PATH and echo $OMNET_DIR.

So far, everything is fine. And the variables are set to the new omnetpp-4.2 .1 folder.

Then I run ./configure in the omnetpp-4.2.1 folder and I face the error mentioned above, While the path is set correctly!

How can I fix it?

tnx


Solution

  • If you have to use two or more different versions of OMNeT++ on the same machine, the best way to do it is to remove EVRYTHING OMNeT++ related from the .bashrc and similar startup scripts and then logout/login.

    Now whenever you want to work with a particular OMNeT++ version, open a terminal and go to the root of the particular OMNeT++ install. Source the setenv script there:

    $ . setenv
    

    And do everything omnet++ related in that terminal. You can even open an other terminal with the other OMNeT++ version the same way and use both of them in parallel. (you should also start the IDE from the terminal using the omnetpp command)