首页 > 数据库技术 > 详细

install cx_Oracle on Linux

时间:2014-08-18 12:22:04      阅读:383      评论:0      收藏:0      [点我收藏+]

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

 

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

 

Good Luck

install cx_Oracle on Linux,布布扣,bubuko.com

install cx_Oracle on Linux

原文:http://www.cnblogs.com/i2u9/p/cx_oracle.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!