C++ – error while loading shared libraries: libgomp.so.1: , wrong GCC version

cc-librariesgcc

While executing a 3rd party c++ program I get the following error:

error while loading shared libraries: libgomp.so.1: cannot open shared object file: No such file or directory

The libgomp.so.1 library is the GNU compiler collection OpenMP runtime library.

Is this part of the GCC package? I can run the program on a system with gcc-4.5, but not system with gcc-4.3 or gcc-4.6.

Or do I need to install another package?

I tried to fix this manually on the system with gcc-4.3 by downloading the library and putting it on the LD_LIBRARY_PATH, but then I get another missing library : /usr/lib/libstdc++.so.6: version `GLIBCXX_3.4.11' not found . libstdc is the GNU Standard C++ library so this also indicates a wrong version of GCC?

I am not a C++ developer so I don't fully know what these libraries are and how libraries work in general with C++ code.

The os is linux 64 bit.

gcc-4.3 machine : openSUSE 11.1

gcc-4.5 machine : openSUSE 11.4 (on this machine the program works)

gcc-4.6 machine : openSUSE 12.1

Best Answer

The program was linked against a specific version of libgomp (libgomp.so.1) and it can only be used by that one. So you have to either:

  1. Obtain the source code of the application and compile it yourself for your system,
  2. Obtain an another version of the application compiled against newer version of gcc,
  3. Obtain a statically linked version of the application,
  4. If your distribution supports that, install the older version of libgomp in parallel,
  5. If it doesn't, you can still grab the older libgomp binary and put it in your /usr/lib (preferably, /usr/local/lib instead if that path is in your /etc/ld.so.conf),
  6. And finally, if that's possible you can downgrade gcc to the older version to make it work. But it's a bad, short-time solution.