0

I am using using Centos 6.6 and there is a shared library the build generates used by number of executable and any executable using this shared library cannot find it as seen by ldd. I can locate the library:

$ locate libcs.so.1
/opt/cloudshield/lib/libcs.so.1

ldd shows the following:

$ sudo ldd /opt/cloudshield/lib/libcs.so.1
ldd: warning: you do not have execution permission for `/opt/cloudshield/lib/libcs.so.1'
    linux-vdso.so.1 =>  (0x00007ffff4fff000)
    libc.so.6 => /lib64/libc.so.6 (0x00007f7a0fd56000)
    /lib64/ld-linux-x86-64.so.2 (0x000000340ba00000)

$ sudo ldconfig -v | grep libcs.so.1

Is it because of the kernel library linux-vdso.so.1?

Executable cannot find the library libcs.so.1:
[fpeter@localhost radius]$ ldd radius
    `linux-vdso.so.1 =>  (0x00007fff634b4000)
    libconfd.so => /home/fpeter/trunk/thirdparty/tailf/confd/lib/libconfd.so (0x00007f5db20e6000)
    libcs.so.1 => not found
    libpthread.so.0 => /lib64/libpthread.so.0 (0x000000340c600000)
    libc.so.6 => /lib64/libc.so.6 (0x000000340c200000)
    libm.so.6 => /lib64/libm.so.6 (0x000000340ce00000)
    libcrypto.so.1.0.0 => /usr/lib64/libcrypto.so.1.0.0 (0x0000003ba4a00000)
    /lib64/ld-linux-x86-64.so.2 (0x000000340ba00000)
    libdl.so.2 => /lib64/libdl.so.2 (0x000000340be00000)
    libz.so.1 => /lib64/libz.so.1 (0x000000340d600000)
Oldskool
  • 34,211
  • 7
  • 53
  • 66

1 Answers1

0

Add /opt/cloudshield/lib/ to your LD_LIBRARY_PATH environment variable, e.g.:

LD_LIBRARY_PATH=/opt/cloudshield/lib
export LD_LIBRARY_PATH

See also How to build library ithoutsudo or shared libraries.

Community
  • 1
  • 1
rocky
  • 7,226
  • 3
  • 33
  • 74