http://qs321.pair.com?node_id=11151886

mendeepak has asked for the wisdom of the Perl Monks concerning the following question:

I am trying to connect to oracle 19 via DBD::Oracle , but am getting this below error
can't load '/usr/local/lib64/perl5/auto/DBD/Oracle/Oracle.so' for module DBD::Oracle libclntshcore.so.12.1: no such file or directory
DBD::Oracle version is 1.74
oracle 19
ORACLE_HOME is set in linux bash_profile
its been some time I have used perl. bit confusing what i need to set

Deepak

Replies are listed 'Best First'.
Re: DBD::Oracle throwing below error
by hv (Prior) on Apr 28, 2023 at 11:42 UTC

    I suggest starting with a look through the output of ldd /usr/local/lib64/perl5/auto/DBD/Oracle/Oracle.so, to compare the paths of libraries it successfully finds to the one(s) it does not.

    The next question is whether the requested library libclntshcore.so.12.1 exists on the system. If it does, then the problem to solve is getting the linker and the actual location to agree, eg by moving or symlinking the file, or via the environment variable LD_LIBRARY_PATH; if it does not, the next step is to check if Oracle or the O/S supply a package that provides that library.

    Beyond that: has it ever worked? What version of perl is it? Did you install DBD::Oracle yourself, or did it come as an O/S package? (If you installed it yourself: did it pass its tests? If it came as an O/S package, it may be a packaging dependencies error.)

Re: DBD::Oracle throwing below error
by marto (Cardinal) on Apr 28, 2023 at 11:40 UTC

    "DBD::Oracle version is 1.74"

    You'll probably want to upgrade. Did you previously have this working with Oracle 12C?

      this is working with 12c

      Deepak

        And you've upgraded to 19?