Firstly, sorry for my English.
My situation is:
- Have a Ubuntu 18.04
- Want to execute with crontab python & sh scripts
- Result: /usr/lib/oracle/12.2/client64/bin/sqlplus: error while loading shared libraries: libsqlplus.so: cannot open shared object file: No such file or directory
The variables i want to add are defined like this:
export ORACLE_HOME=/usr/lib/oracle/12.2/client64 export PATH=$PATH:$ORACLE_HOME/bin export OCI_LIB_DIR=$ORACLE_HOME/lib export OCI_INC_DIR=/usr/include/oracle/12.2/client64 export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib:$ORACLE_HOME
I configure the environment variable in many ways to avoid this error:
- Creating myvars.sh file in /etc/profile.d
The problem is when i configure the variables for my user (in ~/.profile, for example)and I execute on the terminal one python or sh script that use SQL connection, ends well and doesn't give any error. But when the python is execute through crontab, appears in the log the error:
/usr/lib/oracle/12.2/client64/bin/sqlplus: error while loading shared libraries: libsqlplus.so: cannot open shared object file: No such file or directory
i read in other forum threads that
~./bash_profile is used for define environment variables but don't have this file.