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:

import cx_Oracle

cx_Oracle.connect('username','password','host/service_name',cx_Oracle.SYSDBA)

  

Good Luck

install cx_Oracle on Linux的更多相关文章

  1. centos安装安全狗提示Need system command 'locate' to install safedog for linux的解决方法

    今天为客户的centos服务器安装安全狗时提示Need system command 'locate' to install safedog for linux.Installation aborte ...

  2. 使用autotools工具用configure、make、make install编译安装linux工程的详细步骤

    使用autotools工具用configure.make.make install编译安装linux工程的详细步骤 转载tmxkwzy 最后发布于2016-11-24 10:20:15 阅读数 324 ...

  3. install sublime for linux

    Download Your Free eBooks NOW - 10 Free Linux eBooks for Administrators Python API, that available f ...

  4. 转 How to install XenServer Tools – Linux(forward)

    本文转自: http://blog.csdn.net/zhongguoren666/article/details/7088798 比较懒....大家看图说话就行了.... 说句实在话…还是老外写的地 ...

  5. How to install GSL on linux(ubuntu,centos,redhat)

    Test: ftp://ftp.gnu.org/gnu/gsl/gsl-1.15.tar.gz  success. ftp://ftp.gnu.org/gnu/gsl/gsl-1.13.0.tar.g ...

  6. ORACLE 11G R2 RAC classical install OGG12.1(LINUX) 经典抽取模式单项同步配置OGG12.1

    博文结构图如下: 一.环境描述以及注意事项 1.1 环境简介 IP 系统 Oracle版本 OGG版本 源端 172.16.10.16/36 RHEL6.5 oracle11204 12.1 目标端 ...

  7. 02. Install redis on Linux

    安装下载redis,参考官方文档:https://redis.io/download 下载: shell>wget http://download.redis.io/releases/redis ...

  8. python使用cx_Oracle在Linux和Windows下的一点差异

    1. 主要是线程方面的差异. Windows下,把cx_Oracle.connect(connectedId)得到的handle传给定时器线程,主线程和和定时器可以用同一个handle. 但Linux ...

  9. Install Mono on Linux

    Debian, Ubuntu, and derivatives Add the Mono Project GPG signing key and the package repository to y ...

随机推荐

  1. h5移动端-1

    iphone3 : 设备分辨率 : 320*480 屏幕分辨率 : 320*480 iphone4 : 设备分辨率 : 320*480 屏幕分辨率 : 640*960 iphone5 : 设备分辨率 ...

  2. linux命令之三

    0102 文档查阅指令 cat tac nl 简单查阅,-n  可显示行 more, less less is more 查询大文件,可分页. head tail 从头尾看.-n 限制行数. taif ...

  3. 网页中插入视频(object)

    <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://down ...

  4. C语言字符串处理函数

    函数名: strcpy  功  能: 拷贝一个字符串到另一个  用  法: char *stpcpy(char *destin, char *source);  程序例:  #include < ...

  5. JSBinding / FAQ & Trouble Shooting

    Q: Why javascript file extension is .javascript?A: Because Unity treats .js files as Unity script an ...

  6. java 线程安全 synchronized

    一.线程安全问题: 并发编程的原则:设计并发编程的目的是为了使程序获得更高的执行效率,但绝不能出现数据一致性(数据准确)问题,如果并发程序连最基本的执行结果准确性都无法保证,那并发编程就没有任何意义. ...

  7. CentOS常见问题

    1.图形界面无法启动 检查messagebus服务是否为开机启动:chkconfig --list messagebus 如果状态为不启动,则修改之:chkconfig messagebus on 启 ...

  8. 13、java中的多态

    1,多态的体现 父类的引用指向了自己的子类对象. 父类的引用也可以接收自己的子类对象.2,多态的前提 必须是类与类之间有关系.要么继承,要么实现. 通常还有一个前提:存在覆盖. 3,多态的好处 多态的 ...

  9. 关于QFTP乱码

    // 从FTP接收的内容QString FtpUtil::_FromSpecialEncoding(const QString &InputStr){ #ifdef Q_OS_WIN retu ...

  10. Linux 编译ACE

    1.下载 从官网下载地址 http://download.dre.vanderbilt.edu/previous_versions/选择一个版本下载. 注意,如果是在linux上编译,需要下载.gz结 ...