Skip to content
Advertisement

Startup program and libocci.so.11.1: cannot open shared object file: No such file or directory

please any one save my time .my application is written in c++ I was try to startup on boot in ubuntu linux,but when the program try to start it log error like:- error while loading shared libraries: libocci.so.11.1: cannot open shared object file: No such file or directory my program use oracle api:- my start service script which is written in /etc/init.d/sistartup:-

JavaScript

startup script which is written on appropriate user is:- /home/aki/script/startsis.sh

JavaScript

My c++ sample test_db.cpp application write below:-

JavaScript

After compiling the file in this way

JavaScript

I see this error :- error while loading shared libraries: libocci.so.11.1: cannot open shared object file: No such file or directory

Advertisement

Answer

If you have to provide -L$ORACLE_HOME/lib on the build command line, that suggests to me that the libraries aren’t in any of the system’s library paths, so they won’t be found automatically at runtime.

You can confirm this theory by setting LD_LIBRARY_PATH=$ORACLE_HOME/lib before running your program; it should then work. However, depending on your requirements, this may be only worth a temporary workaround (and I’m assuming the $ORACLE_HOME is available!). A more long-term fix might be to add this path to /etc/ld.so.conf, though this then will affect all executables on your system.

Ultimately, you should follow the installation instructions for the library.

Advertisement