linux - Loading shared libraries with ssh framework -
hi there i'am using sshxcute framework access linux server. idea execute application compiled gcc java project. gcc applications has next dependency:
libdl.so.2 => /lib64/libdl.so.2 (0x000000300ca00000) libocci.so.11.1 => /e01/demov7/lib/libocci.so.11.1 (0x00002ac507b33000) libclntsh.so.11.1 => /u01/app/oracle/product/11gr2/lib/libclntsh.so.11.1 (0x00002ac507e2e000) libnnz11.so => /u01/app/oracle/product/11gr2/lib/libnnz11.so (0x00002ac50a459000) libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x000000301ec00000) libm.so.6 => /lib64/libm.so.6 (0x000000300c600000) libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x000000301ac00000) libc.so.6 => /lib64/libc.so.6 (0x000000300c200000) /lib64/ld-linux-x86-64.so.2 (0x000000300be00000) libpthread.so.0 => /lib64/libpthread.so.0 (0x000000300ce00000) libnsl.so.1 => /lib64/libnsl.so.1 (0x000000300fa00000) libaio.so.1 => /usr/lib64/libaio.so.1 (0x0000003a92800000)
but when try execute application have next error
error while loading shared libraries: libocci.so.11.1: cannot open shared object file: no such file or directory
do need execute somme command or configure environment variables allow access server libraries ?
i attached code here.
sshexec ssh = null; connbean cb = new connbean("127.0.0.1", "user", "password"); ssh = sshexec.getinstance(cb); customtask ct1 = new execcommand("./myapplication"); ssh.connect(); result res = ssh.exec(ct1); if (res.issuccess) { response = res.sysout; } else { response = res.error_msg; } ssh.disconnect() ;
try setting ld_library_path
include custom library dirs, e.g.
ld_library_path=/e01/demov7/lib:/u01/app/oracle/product/11gr2/lib
Comments
Post a Comment