Install the Oracle Instant Client in a 64-bit compiling environment in Ubuntu 10.04

Source: Internet
Author: User

Recently I want to review oci programming. In the past, Oracle client was required to build an oci development environment in the development environment. Very troublesome. Since instant client is recommended for oracle, try it. Last night. Record the installation process:

1. Before downloading the instant client, check whether your compiler is 64-bit or 32-bit. I didn't care at first. I downloaded the instant client for linux x86. The result compilation reports an error, indicating that libclntsh. so cannot be found. Therefore, libclntsh. so cannot be found. It is not only because the environment variable LD_LIBRARY_PATH is not set correctly, but also because the 32-bit library file cannot be linked by the 64-bit compiler. Check the compiler version to see whether it is a 32-bit or 64-bit problem:

Gcc-v:

Target: x86_64-linux-gnu

2. Download oralce-instantclient11.2-basic-11.2.0.2.0.x86 _ 64.rpm, oralce-benchmark-sqlplus-11.2.0.2.0.x86 _ 64.rpm, oralce-instantclient11.2-devel-11.2.0.2.0.x86_64.rpm. then install with the rpm-ivh command. If you want to enhance the system options, add them. It may not be recommended to install the rpm package here. It is easier to install Ubuntu with a compressed package.

3. After the rpm package is successfully installed, set LD_LIBRARY_PATH and set the. bashrc file in ubuntu 10.04 instead of bash_profile.

4. When the program is compiled, an unexpected error is reported: libaio. so cannot be found. What is the use of this library? This package explains: This library enables userspace to use Linux kernel asynchronous I/O
System CILS, important for the performance of databases and other advanced applications. This is very simple. Use the new idea to find the libaio. so installation is OK.

5. Finally, the compilation is successful. The required header files and library files account for dozens of megabytes. The header file is installed with rpm in the/usr/include/oracle/11.2/client directory. The library files are installed with rpm in the/usr/lib/oracle/11.2 directory. Be sure to check whether the database is a 32-bit database or a 64-bit database. In the 11.2 directory, there are two directories: client and client64. One is a 32-bit database and the other is a 64-bit database. 11.2 is named after the version number of the instant client.

Note: The downloaded version is version 11.2.0.2.0.

Related Article

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.