I have been struggling for several days to install the Oracle Instant Client files on a Linux Web App Service. I am running a Python/Flask web app on it and I want to use the cx_Oracle library which requires Oracle Instant Client.
This is something that I have done on another server but I cannot seem to replicate/configure it on Azure Web App service.
At the moment I keep getting the error message:
"Cannot locate a 64-bit Oracle Client library: "libaio.so.1: cannot open shared object file: No such file or directory".
What I have done: Downloaded instantclient_21_1 (64 bits) from this link, then unzipped it
cd /home/site/wwwroot/
wget https://download.oracle.com/otn_software/linux/instantclient/211000/instantclient-basic-linux.x64-21.1.0.0.0.zip
unzip instantclient-basic-linux.x64-21.1.0.0.0.zip
I installed libaio1 with apt-get install libaio1
.
I then need to set LD_LIBRARY_PATH to home/site/wwwroot/instantclient_21_1.
I tried echo export LD_LIBRARY_PATH=/home/site/wwwroot/instantclient_21_1 >> ~/.bashrc
but it doesn't work because bashrc cannot be saved in Azure Web App ("Any data outside '/home' is not persisted").
I created an applicationHost.xdt file as said on this link but it did not work.
I went to the Azure Web App Settings > Configuration > Application Settings, then set up LD_LIBRARY_PATH to /home/site/wwwroot/instantclient_21_1 but it didn't work.
Finally in my Python script I tried cx_Oracle.init_oracle_client(lib_dir='/home/site/wwwroot/instantclient_21_1')
and I still get the same error message.
Can anyone help? Thanks a lot!