Duha Hamad
Duha Hamad

Reputation: 1

Can't load '/usr/local/lib64/perl5/auto/DBD/Oracle/Oracle.so' for module DBD::Oracle: libclntsh.so.12.1

When trying to run a perl script that creates a new oracle database from a PHP web page, an error is raised.

Upvotes: 0

Views: 10367

Answers (1)

zb226
zb226

Reputation: 10529

Actually, the error message contains the important pointer (emphasis mine):

install_driver(Oracle) failed: Can't load '/usr/local/lib64/perl5/auto/DBD/Oracle/Oracle.so' for module DBD::Oracle: libclntsh.so.12.1: cannot open shared object file: No such file or directory at /usr/lib64/perl5/DynaLoader.pm line 190. at (eval 17) line 3. Compilation failed in require at (eval 17) line 3. Perhaps a required shared library or dll isn't installed where expected at (eval 10) line 22698.

This problem arises when Oracle's "instant client" libraries are not available via the LD_LIBRARY_PATH environment variable. This set of libraries contains (among others) libclntsh.so (the suffix is version-dependant). Once you have it installed, just make sure the corresponding path is present in LD_LIBRARY_PATH.

Upvotes: 1

Related Questions