0

I have a script that is using DBI to interface with Oracle, but I keep getting the following error:

install_driver(Oracle) failed: Can't load '/usr/opt/perl5/lib/site_perl/5.005/aix/auto/DBD/Oracle/Oracle.s o' for module DBD::Oracle: dlopen: /usr/opt/perl5/lib/site_perl/5.005/aix/auto/DBD/Oracle/Oracle.so: can't load library /usr/opt/perl5/lib/site_perl/5.005/aix/auto/DBD/Oracle/Oracle.so50 /usr/oracle/lib/libclnts h.a shr.o103 /usr/oracle/lib/libclntsh.a shr.ocan't load library /usr/oracle/lib/libclntsh.a50 /usr/oracle /lib/libclntsh.a at /usr/local/lib/perl5/5.6.0/aix/DynaLoader.pm line 200. at (eval 1) line 3 Compilation failed in require at (eval 1) line 3. Perhaps a required shared library or dll isn't installed where expected at ./dbi_test.pl line 9

Line 9 is were id do the prepare statement in my perl script: my $sth = $dbh->prepare('Sql statement here') or die "Couldn't prepare statement: " . $dbh->errstr;

I looked and I have 2 versions of Perl installed in the /usr/opt/perl5/lib/site_perl/ directory: 5.005 and 5.8.0

My boss informed me that the version of AIX installs one version and our version of Oracle installs another. So I'm thinking I'm loading the wrong driver, but am not sure.

Does anyone see what might be the problem?

Any help is appreciated.

1 Answer 1

1

It looks like you might have installed the DBI driver under your 5.8 perl installation, but the system is using the 5.005 installation when your script is run (probably due to your PATH setting). Change your path to use the 5.8 executable, and set your PERL5LIB environment variable to include the 5.8 library paths.

If you have to use the 5.005 version, then install DBI under that version as well.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.