libclntsh.so.11.1:无法打开共享对象文件 [英] libclntsh.so.11.1: cannot open shared object file

查看:2628
本文介绍了libclntsh.so.11.1:无法打开共享对象文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想通过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屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆