e.b.white e.b.white - 1 year ago 235
Bash Question

libclntsh.so.11.1: cannot open shared object file

I want to schedule a task on linux by icrontab, and the task is written in python and have to
import cx_Oracle module, so I export ORACLE_HOME and LD_LIBRARY_PATH in .bash_profile, but
it raise the error:

libclntsh.so.11.1: cannot open shared object file.

Since it is ok to run the task by issue the command in shell like

python a.py # ok

I change the task in icrontab into a shell script which invoke my python script, but the exception recurred?

# the shell script scheduled in icrontab
#! bash
python a.py

Could you help how to do with it?

Answer Source

Possibly you want to specify PATH — and also ORACLE_HOME and LD_LIBRARY_PATH — so that cron(1) knows where to find binaries.
Read "5 Crontab environment" here.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download