Install Cx_oracle on Linux

Source: Internet
Author: User

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 does this

CD $ORACLE _home

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

Now you can does this:

Pip Install Cx_oracle

Good Luck

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.