I am new to Azure.
We have created one small POC in which I need to select the VM name and Resource group name in which that VM is present. And then I need to mention the command which I need to execute and then click on execute button which will execute the command.
Now what I have done, I have created one script in linux in which I have given some ora2pg commands. So what is happening when I am trying to run that script directly on VM by passing some parameter, it is working fine without any error.
But same script when I am trying to run through that the POC which I created (by giving VM name, Resource group name and then passing the command which I want to execute) it is giving this error -
Enable succeeded: [stdout] Schema Name : OT Conversation of tables for OT schema started Conversation of views for OT schema started Conversation of package for OT schema started Conversation of sequence for OT schema started Conversation of type for OT schema started Conversation of trigger for OT schema started Conversation of function for OT schema started Conversation of procedure for OT schema started Successfully copied to OT_SCHEMA [stderr] install_driver(Oracle) failed: Can't load '/usr/local/lib64/perl5/auto/DBD/Oracle/Oracle.so' for module DBD::Oracle: libclntsh.so.18.1: cannot open shared object file: No such file or directory at /usr/lib64/perl5/DynaLoader.pm line 193. at (eval 14) line 3. Compilation failed in require at (eval 14) line 3. Perhaps a required shared library or dll isn't installed where expected at /usr/local/share/perl5/Ora2Pg.pm line 1660. install_driver(Oracle) failed: Can't load '/usr/local/lib64/perl5/auto/DBD/Oracle/Oracle.so' for module DBD::Oracle: libclntsh.so.18.1: cannot open shared object file: No such file or directory at /usr/lib64/perl5/DynaLoader.pm line 193. at (eval 14) line 3. Compilation failed in require at (eval 14) line 3. Perhaps a required shared library or dll isn't installed where expected at /usr/local/share/perl5/Ora2Pg.pm line 1660. install_driver(Oracle) failed: Can't load '/usr/local/lib64/perl5/auto/DBD/Oracle/Oracle.so' for module DBD::Oracle: libclntsh.so.18.1: cannot open shared object file: No such file or directory at /usr/lib64/perl5/DynaLoader.pm line 193. at (eval 14) line 3. Compilation failed in require at (eval 14) line 3. Perhaps a required shared library or dll isn't installed where expected at /usr/local/share/perl5/Ora2Pg.pm line 1660. install_driver(Oracle) failed: Can't load '/usr/local/lib64/perl5/auto/DBD/Oracle/Oracle.so' for module DBD::Oracle: libclntsh.so.18.1: cannot open shared object file: No such file or directory at /usr/lib64/perl5/DynaLoader.pm line 193. at (eval 14) line 3. Compilation failed in require at (eval 14) line 3. Perhaps a required shared library or dll isn't installed where expected at /usr/local/share/perl5/Ora2Pg.pm line 1660. install_driver(Oracle) failed: Can't load '/usr/local/lib64/perl5/auto/DBD/Oracle/Oracle.so' for module DBD::Oracle: libclntsh.so.18.1: cannot open shared object file: No such file or directory at /usr/lib64/perl5/DynaLoader.pm line 193. at (eval 14) line 3. Compilation failed in require at (eval 14) line 3. Perhaps a required shared library or dll isn't installed where expected at /usr/local/share/perl5/Ora2Pg.pm line 1660. install_driver(Oracle) failed: Can't load '/usr/local/lib64/perl5/auto/DBD/Oracle/Oracle.so' for module DBD::Oracle: libclntsh.so.18.1: cannot open shared object file: No such file or directory at /usr/lib64/perl5/DynaLoader.pm line 193. at (eval 14) line 3. Compilation failed in require at (eval 14) line 3. Perhaps a required shared library or dll isn't installed where expected at /usr/local/share/perl5/Ora2Pg.pm line 1660. install_driver(Oracle) failed: Can't load '/usr/local/lib64/perl5/auto/DBD/Oracle/Oracle.so' for module DBD::Oracle: libclntsh.so.18.1: cannot open shared object file: No such file or directory at /usr/lib64/perl5/DynaLoader.pm line 193. at (eval 14) line 3. Compilation failed in require at (eval 14) line 3. Perhaps a required shared library or dll isn't installed where expected at /usr/local/share/perl5/Ora2Pg.pm line 1660. install_driver(Oracle) failed: Can't load '/usr/local/lib64/perl5/auto/DBD/Oracle/Oracle.so' for module DBD::Oracle: libclntsh.so.18.1: cannot open shared object file: No such file or directory at /usr/lib64/perl5/DynaLoader.pm line 193. at (eval 14) line 3. Compilation failed in require at (eval 14) line 3. Perhaps a required shared library or dll isn't installed where expected at /usr/local/share/perl5/Ora2Pg.pm line 1660.
Note - My Linux VM is in Azure and it is using Custom script for linux extension to run all the commands. I have moved my script to bin folder so that by passing only the name it will run the script.
I have mention following things in env path in linux -
export ORACLE_HOME=/usr/lib/oracle/18.3/client64
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
export PATH=$PATH:$ORACLE_HOME/bin:/usr/pgsql-12/bin/
My perl version is 5.26
As I said everything is working fine when I am trying to run from VM, but when I trying to run through my POC it is giving that issue.
Can anyone please help me with the issue like where I am lagging?!
Thanks in advance.