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

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

问题描述

我想通过icrontab在linux上安排一个任务,任务是用python编写的,并且必须要
import cx_Oracle模块,所以我导出了.bash_profile中的ORACLE_HOME和LD_LIBRARY_PATH,但是
它提高了错误:

  libclntsh.so.11.1:无法打开共享对象文件。 

由于可以通过在shell中发出命令来运行任务,如

  python a.py#ok 



 #将这个任务变成一个shell脚本,它调用了我的python脚本shell脚本安排在icrontab 
#! bash
python a.py

你能帮助怎么做?

解决方案

可能您想要指定 PATH - 还有 ORACLE_HOME LD_LIBRARY_PATH - 以便 cron(1)知道在哪里找到二进制文件。 br>
阅读5 Crontab环境 here


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?

解决方案

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天全站免登陆