New answers tagged dynamic-linking
The problem is here: libgmodule-2.0.so.0 => /usr/local/lib/libgmodule-2.0.so.0 (0x00007f1bba2a7000) libgio-2.0.so.0 => /usr/local/lib/libgio-2.0.so.0 (0x00007f1bb884f000) libgobject-2.0.so.0 => /usr/local/lib/libgobject-2.0.so.0 (0x00007f1bb7f81000) libglib-2.0.so.0 => /usr/local/lib/libglib-2.0.so.0 (0x00007f1bb7c64000) libgthread-2.0.so.0 ...
I have seen similar issue with one of my application and it was due to selinux in enforcing state. Change : /etc/selinux/config from SELINUX=enforcing ## or permissive to SELINUX=disabled This should fix it. http://sysadminupdates.com/blog/2015/05/11/so-cannot-open-shared-object-file-permission-denied/
The answer is "Other". You can get a glimpse of the memory layout with cat /proc/self/maps. On my 64-bit Arch laptop:: 00400000-0040c000 r-xp 00000000 08:02 1186758 /usr/bin/cat 0060b000-0060c000 r--p 0000b000 08:02 1186758 /usr/bin/cat 0060c000-0060d000 rw-p 0000c000 08:02 1186758 ...
In your script, these two lines close to the top should do the trick: LD_LIBRARY_PATH="$(pwd)/lib" export LD_LIBRARY_PATH Although bash allows you to set and export a variable in a single statement, not all shells do, so the two step approach is more portable, if that's a concern. If this isn't working for you, check that you are running the script from ...
you should execute you program in this way: LD_LIBRARY_PATH=$(pwd)/lib/ <your_executable_here>
Top 50 recent answers are included