Error loading shared libraries: libgomp.so.1 :, incorrect version of GCC?

When I run a third-party program in C ++, I get the following error:

when loading shared libraries: libgomp.so.1: cannot open shared objects file: no such file or directory

The libgomp.so.1 library is a collection of the GNU compiler for the OpenMP library.

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

Or do I need to install another package?

I tried to fix this manually on the system using gcc-4.3, loading the library and putting it on 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 C ++ standard library, so does this also indicate the wrong version of GCC?

I am not a C ++ developer, so I don’t quite understand what these libraries are and how libraries in general work with C ++ code.

os - 64-bit Linux.

A machine

gcc-4.3: openSUSE 11.1

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

gcc-4.6: openSUSE 12.1

+5
source share
3 answers

The program was associated with a specific version of libgomp ( libgomp.so.1), and it can only be used by this. Therefore, you need to either:

  • ,
  • , gcc,
  • ,
  • , libgomp ,
  • , libgomp /usr/lib (, /usr/local/lib, /etc/ld.so.conf),
  • , , , gcc , . , .
+3

comamnd ldd. :

$ ldd /bin/ls
    linux-gate.so.1 =>  (0xb76fe000)
    libselinux.so.1 => /lib/i386-linux-gnu/libselinux.so.1 (0xb76be000)
    librt.so.1 => /lib/i386-linux-gnu/librt.so.1 (0xb76b5000)
    libacl.so.1 => /lib/i386-linux-gnu/libacl.so.1 (0xb76ab000)
    libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xb7506000)
    libdl.so.2 => /lib/i386-linux-gnu/libdl.so.2 (0xb7501000)
    /lib/ld-linux.so.2 (0xb76ff000)
    libpthread.so.0 => /lib/i386-linux-gnu/libpthread.so.0 (0xb74e6000)
    libattr.so.1 => /lib/i386-linux-gnu/libattr.so.1 (0xb74e0000)

, , , LD_LIBRARY_PATH. , :

  • linux-gate.so: , .
  • /lib/ld-linux-so.2: ( ELF, ). . .
  • [/usr]/lib/i386-linux-gnu/*: . , . , [/usr]/lib/<your-real-arch>/*.

ldd export LD_LIBRARY_PATH=..., , .

+2

, gcc-4.5, , , 4.5. ( Linux) , clib ++ lib. gcc-4.3 Linux-.

gcc-4.6 , libgomp.so.1. , .

,

man ldd

+1

All Articles