0
votes

I need to write some data in several database. I choose sqlapi.com

I have made it for mysql and mssql. Now I have Problem with Oracle database.

I have installed server and client on Ubuntu. In browser it works, but sqlapi says:

libnnz10.so: cannot open shared object file: No such file or directory

DBMS API Library 'libclntsh.so' loading fails

This library is a part of DBMS client installation, not SQLAPI++

Make sure DBMS client is installed and

this required library is available for dynamic loading

Linux/Unix:

1) The directories in the user's LD_LIBRARY_PATH environment variable

2) The list of libraries cached in /etc/ld.so.cache

3) /usr/lib, followed by /lib

There are both of these files depp inside /usr/lib. I have tried a lot of ways to say eclipse path to this folder, but nothing works.

Thanks for help.

1
libclntsh.so is the client library to access oracle databases. So basically you're asking how to tell eclipse where to pick up a given DLL right ? I am not sure I understand, do you launch your program from eclipse or from the command line.... ? - Matthieu M.

1 Answers

1
votes

I think that you need to set the variable LD_LIBRARY_PATH to the file path of the shared lib.

e.g.

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/oracle/instantclient/lib

set the variable in .profile or .bash_profile. This depends on the shell you are using.

Update

Due to some new security requirements in ubuntu (see https://bugs.launchpad.net/ubuntu/+bug/366728 for details) you cannot use LD_LIBRARY_PATH for non-interactive shells. Use the following procedure (adjust the oracle path to your needs):

echo "/opt/oracle/product/whatever/lib" | sudo tee /etc/ld.so.conf.d/oracle.conf
sudo ldconfig -v