0

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.... ? Commented Apr 12, 2010 at 14:13

1 Answer 1

1

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
Sign up to request clarification or add additional context in comments.

3 Comments

yes, probably it has something to do with this path. "echo LD_LIBRARY_PATH" give me nothing. i tried change it with this export, resp. "export LD_LIBRARY_PATH=/usr/lib/oracle/xe/app/oracle/product/10.2.0/client/" there in subdirectory /lib/ are these *.so files but doesnt work :-/
ha! when i add this export to .profile, after restart is variable $LD_LIBRARY_PATH still empty, something rewrites my settings, actually only this variable.
help.ubuntu.com/community/EnvironmentVariables "LD_LIBRARY_PATH cannot be set in $HOME/.profile, /etc/profile, nor /etc/environment files. You must use /etc/ld.so.conf.d/*.conf configuration files." Yes, that was the reason, i found out it yesterday too. thanks.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.