install oci8 in ubuntu

Development (Ubuntu)

mkdir -p ~/apps/oracle

mv ~/Downloads/instantclient-* ~/apps/oracle
cd ~/apps/oracle
unzip instantclient-basic-linux.x64-18.3.0.0.0dbru.zip
unzip instantclient-sdk-linux.x64-18.3.0.0.0dbru.zip
  • Create the config file oci8.pc
vim ~/apps/oracle/oci8.pc
with the content as file conf/oci8.pc (change /opt/oracle/instantclient_18_3 to /home/<your_username>/apps/oracle/instantclient_18_3)
  • Add to the end of your .profile or .bashrc
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/<your_username>/apps/oracle/instantclient_18_3
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/home/<your_username>/apps/oracle
  • Add symlinks to /usr/local/lib
sudo ln -s /home/<your_username>/apps/oracle/instantclient_18_3/libclntsh.so /usr/local/lib/
sudo ln -s /home/<your_username>/apps/oracle/instantclient_18_3/libclntsh.so.18.1 /usr/local/lib/
  • Install lib libaio.so.1 (needed by instantclient_18_3/libclntsh.so)
sudo apt install libaio1

Comments

Popular posts from this blog

Fixing the DeepSpeed Import Error While Fine-Tuning the Qwen Model

Amazon Linux 2023 - User data configuration for launch templates to connect to the EKS cluster

How to create ISM policy and rotate logs in opensearch