This is usually caused by the LD_LIBRARY_PATH variable, which is not available in Oracle libraries. You need to find the folder where libclntsh.so.12.1 sits and sets this environment variable.
Hope this is in your Oracle installation directory, in which case you can do this:
find -L /usr/lib/oracle -name libclntsh.so.12.1
The -L find switch follows symbolic links. This is not the default behavior, however it is possible that libclntsh.so.12.1 is actually a symbolic link to libclntsh.so .
If you cannot find the file, you will have to go through the entire directory structure. It might be worth switching the -L switch for the first time ...
find -L / -name libclntsh.so.12.1
After you find the file, you need to set LD_LIBRARY_PATH . As once you can use:
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/lib/oracle/lib
Where /usr/lib/oracle/lib is replaced by a directory.
If you want to make this change permanent, the usual way for Ubuntu is to add a custom .conf file to /etc/ld.so.conf , see the question "Using shared libraries in / usr / local / lib" on Unix and Linux .
source share