Ariba Syed
Ariba Syed

Reputation: 3

Python: How to access cx_Oracle in Pivotal Cloud Foundry?

I need to deploy my python APIs in PCF, but facing issues in accessing the cx_Oracle library when deploying.

Steps I have done until now:-

  1. Unzipped the Oracle Instant Client(Linux) in a folder named "oracle" under my project.
  2. Added these to .profile
LD_LIBRARY_PATH=/c/Documents/project_name/oracle/instantclient_21_1:${LD_LIBRARY_PATH:-} 
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/c/Documents/project_name/oracle/instantclient_21_1 
export OCI_LIB_DIR=/c/Documents/project_name/oracle/instantclient_21_1 
export OCI_INC_DIR=/c/Documents/project_name/oracle/instantclient_21_1/sdk/include

Even after this I am getting the following error:

"DPI-1047: Cannot locate a 64-bit Oracle Client library: "libclntsh.so: cannot open shared object file: No such file or directory". See https://cx-oracle.readthedocs.io/en/latest/user_guide/installation.html for help"

Upvotes: 0

Views: 257

Answers (1)

arjain13
arjain13

Reputation: 606

Try using below in your .profile file: Assuming you have oracle linux client in your root folder

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HOME/oracle/instantclient_21_1
export PATH=$PATH:$HOME/oracle/instantclient_21_1

Upvotes: 1

Related Questions