Loading [MathJax]/jax/output/HTML-CSS/config.js

Good,True and Beautiful

Good Good Study, Day Day Up

导航

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

统计

install cx_Oracle on Linux

step 1 : install oracle client library

    url: http://www.oracle.com/technetwork/topics/linuxsoft-082809.html

   or search:  instant clients download for Linux x86

   download:    instantclient-basic-linux-version.zip   # choose your version !!!!

                       instantclient-sdk-linux-version.zip     # header files to compile cx_Oracle

  unzip them to one directory (./libclntsh.so ./include ./admin .....)

 

step 2: config enviroment variables

    export ORACLE_HOME=/path/to/instantclient   # must

    config LD_LIBRARY_PATH ( i used it but failed, so i edit file /etc/ld.so.conf)

    after edit ld.so.conf file, you need run ldconfig (as root)

 

step 3: install cx_Oracle

  prepare: Python.h

           yum install python-devel or  apt-get install python-dev

 cause "/usr/bin/ld: cannot find -lclntsh", you need do this 

           cd $ORACLE_HOME

           ln -s libclntsh.so.version libclntsh.so # repalce version to right num

 

now you can do this:

        pip install cx_Oracle

 

Use Binary Way ( like windows ):

Files: https://pypi.python.org/pypi/cx_Oracle  http://sourceforge.net/projects/cx-oracle/

 

 

Test:

1
2
3
import cx_Oracle
 
cx_Oracle.connect('username','password','host/service_name',cx_Oracle.SYSDBA)

  

Good Luck

posted on   Simple Love  阅读(1223)  评论(0编辑  收藏  举报

编辑推荐:
· 从二进制到误差:逐行拆解C语言浮点运算中的4008175468544之谜
· .NET制作智能桌面机器人:结合BotSharp智能体框架开发语音交互
· 软件产品开发中常见的10个问题及处理方法
· .NET 原生驾驭 AI 新基建实战系列:向量数据库的应用与畅想
· 从问题排查到源码分析:ActiveMQ消费端频繁日志刷屏的秘密
阅读排行:
· 《HelloGitHub》第 108 期
· Windows桌面应用自动更新解决方案SharpUpdater5发布
· 我的家庭实验室服务器集群硬件清单
· C# 13 中的新增功能实操
· Supergateway:MCP服务器的远程调试与集成工具
点击右上角即可分享
微信分享提示