so im trying to push a python api with cx_oracle dependency which also need oracle instant client,but i couldnt found an tutorial to deploy instant client on pcf,is anybody ever do this before or have any example what should be done? appreciate it
Update:
This is the inside of my .profile
LD_LIBRARY_PATH=/home/vcap/app/oracle/instantclient:${LD_LIBRARY_PATH:-}
export OCI_LIB_DIR=/home/vcap/app/oracle/instantclient
export OCI_INC_DIR=/home/vcap/app/oracle/instantclient/sdk/include
export PYTHONPATH=/home/vcap/app/vendor:$PYTHONPATH
export LD_LIBRARY_PATH=/lib:/usr/lib:/usr/local/lib
oracle/
.cx-Oracle
like normal with pip
.requirements.txt
..profile
to the root of your application, in it put export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/vcap/app/oracle/lib
(where /home/vcap/app
is the path to your application files and oracle/lib
is the path to the lib
directory beneath the folder where you extracted files in step #2).The .profile
file will run before your actual application starts and it will adjust the library search path so that the Oracle client libraries can be found.
If you get the error:
cx_Oracle.DatabaseError: DPI-1047: Cannot locate a 64-bit Oracle Client library: "/home/vcap/app/oracle/instantclient/libclntsh.so: file too short"
Double check your .profile
script and make sure that you have the correct LD_LIBRARY_PATH
setting.