libclntsh.so.11.1:无法打开共享对象文件 [英] libclntsh.so.11.1: cannot open shared object file
问题描述
我想通过icrontab在linux上安排一个任务,任务是用python编写的,并且有
import cx_Oracle模块,所以我在.bash_profile中导出ORACLE_HOME和LD_LIBRARY_PATH,但是
错误:
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.
由于可以通过在shell中发出命令来运行该任务,
Since it is ok to run the task by issue the command in shell like
python a.py # ok
我将icrontab中的任务更改为调用我的python脚本的shell脚本,但异常重现了?
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
你能帮忙吗?
推荐答案
可能要指定 PATH
- 以及 ORACLE_HOME
和 LD_LIBRARY_PATH
- 以便 cron(1)
知道在哪里找到二进制文件。 br>
请阅读5 Crontab环境此处。
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.
这篇关于libclntsh.so.11.1:无法打开共享对象文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!