Ubuntu cx_oracle Installation notes

Source: Internet
Author: User
Ubuntu cx_oracle Installation notes
(1) $ sudo apt-Get install Python-dev // for some versions without python. h
(2) http://cx-oracle.sourceforge.net/download source code only. My version is
Cx_Oracle-5.0.tar.gz.
$ Tar zxvf cx_Oracle-5.0.tar.gz
$ Cx_Oracle-5.0 CD
$ Setup Python build
$ Setup Python install // This step prompts that the permission is insufficient.
Change to root user # setup Python install
(3) >>> import cx_oracle
Importerror: libclntsh. so.10.1: cannot open shared object file: no such file or directory

$ Locate libclntsh. so.10.1
/Home/Oracle/ora10/lib/libclntsh. so.10.1

According to the build.txt documentation, you must set the environment variables ORACLE_HOME and LD_LIBRARY_PATH.
Add the following in the. bashrc file:
Export ORACLE_HOME =/home/Oracle/ora10/
Export LD_LIBRARY_PATH =/home/Oracle/ora10/lib: $ LD_LIBRARY_PATH

$ Source. bashrc
Problem Solving

Note:
I have installed Oracle and python on a local machine, so there is no client installation problem. you need to download the instantclient basic version from the Oracle website, and then ln-s libclntsh. so. x. X libclntsh. so (this has not been tried)

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.