0

Getting an error "error while loading shared libraries: libmpi.so.1: cannot open shared object file: No such file or directory" while running veins simulation in Omnet++

enter image description here

EDIT:

I reinstalled the omnet++ and now I am getting this error:

JVM terminated. Exit code=13
/home/jayabalan/usr/omnetpp-4.6/ide/jre/bin/java
-Dosgi.requiredJavaVersion=1.7
-Xms256m
-Xmx1024m
-XX:MaxPermSize=320m
-Dosgi.instance.area.default=/home/jayabalan/usr/omnetpp-4.6/bin/../ide/../samples
-jar /home/jayabalan/usr/omnetpp-4.6/ide//plugins/org.eclipse.equinox.launcher_1.3.0.v20140415-2008.jar
-os linux
-ws gtk
-arch x86_64
-showsplash
-launcher /home/jayabalan/usr/omnetpp-4.6/ide/omnetpp
-name OMNeT++ IDE
--launcher.library /home/jayabalan/usr/omnetpp-4.6/ide//plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.200.v20140603-1326/eclipse_1605.so
-startup /home/jayabalan/usr/omnetpp-4.6/ide//plugins/org.eclipse.equinox.launcher_1.3.0.v20140415-2008.jar
--launcher.appendVmargs
-exitdata 340021
-vm /home/jayabalan/usr/omnetpp-4.6/ide/jre/bin/java
-vmargs
-Dosgi.requiredJavaVersion=1.7
-Xms256m
-Xmx1024m
-XX:MaxPermSize=320m
-Dosgi.instance.area.default=/home/jayabalan/usr/omnetpp-4.6/bin/../ide/../samples
-jar /home/jayabalan/usr/omnetpp-4.6/ide//plugins/org.eclipse.equinox.launcher_1.3.0.v20140415-2008.jar 
Jayabalan Bala
  • 646
  • 6
  • 14

2 Answers2

1

First error:

Either of two things may be happening (or both):

1 – You do not have the specific lib (unlikely because the compiler and linker would have built and linked with the library symbols).

2 – The path is not correct and the binary at runtime cannot locate the lib correctly.

I assume you are using a Linux flavour, I also noticed that you have a double set of colons appended within both your environment variables i.e. ( :: )

$PATH
$LD_LIBRARY_PATH

Which could be the result of you appending the paths to the variables incorrectly (try removing one of the colons by appending the environment variable again without a colon).

For example:

Appending to existing environment variable

print my current environment variable to console: (same for LD_LIBRARY_PATH)

VirtualBox:~$ echo $PATH
/usr/local/polysync/utils/x86_64.linux/bin:/usr/local/polysync/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games

Append a new path to the end of $PATH

export PATH=$PATH:/boom/yea

VirtualBox:~$ echo $PATH

/usr/local/polysync/utils/x86_64.linux/bin:/usr/local/polysync/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/boom/yea

Scroll along to see the appended path.

The following post describes the process very well:

https://unix.stackexchange.com/questions/26047/how-to-correctly-add-a-path-to-path

Also check you have the lib by using:

VirtualBox:~$ sudo find / lib | grep libmpi.so.1

Hope this helps. You will need to log out and back in for Eclipse to see the changes. Would also be helpful if you posted strings instead of a screen shot (copy and paste the console output for eaxmple).

Community
  • 1
  • 1
0

Second error:

The almost certainly a Java SDK/JDK version problem or path problem preventing the Eclispe enviroment from starting.

Check your Java version:

$ java -version

Because of the

-Dosgi.requiredJavaVersion=1.7

output in the error log suggest its looking for 1.7.

Then check this post describing many solutions to this problem:

Can't start Eclipse - Java was started but returned exit code=13

Community
  • 1
  • 1
  • Thanks! I was using jdk 1.8. Downgrading to 1.7 made it work! – Jayabalan Bala Aug 18 '17 at 19:26
  • Error in module (Veins::TraCIScenarioManagerLaunchd) RSUExampleScenario.manager (id=6) at event #14, t=1.3: Model error: Connection to TraCI server closed unexpectedly. Check your server's log. – Jayabalan Bala Aug 18 '17 at 20:07
  • I am getting the above error on running the veins example on the Omnet++ – Jayabalan Bala Aug 18 '17 at 20:07
  • Yup, never used OMNet++ so can't really help unfortunatly. Looks like the enviroment up and running now though and just some configuration of the host machine or other entities will get it running. – HalosFinest Aug 18 '17 at 20:57