I'm running RHEL9 with perl 5.32. I am trying to get httpd (v2.4.62) to serve some perl scripts through a web browser. When a script is executed that uses Oracle, I get the following error appearing in the httpd/ssl_error_log:

Can't locate loadable object for module DBD::Oracle in @INC (@INC cont +ains: /usr/local/lib64/perl5/5.32 /usr/local/share/perl5/5.32 /usr/li +b64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 / +usr/share/perl5)

The Oracle instantclient v11.2 is installed (I need this version for the DB I connect to) and appears to be working properly. sqlplus runs without issues from the CLI. I've also installed the DBI v1.643 perl module from source. If I install DBI through CPAN it installs v1.647, which causes mismatch issues. When I installed DBI the make test passed, so I assume that it installed properly. make install also seemed to work fine.

When it says that it can't locate a loadable object for DBD::Oracle, I'm not sure what it's looking for, so I'm having issues verifying that everything did install as expected.

One thing to note... If I execute the perl script from the CLI as a user, I see the same error. If I execute it as root, it appears to work fine. All the files that I can find appear to have the correct permissions so I don't understand why this is happening.

Can anyone suggest why this is happening and what I should do to resolve this problem?

Thanks!

Update... This doesn't appear to have anything to do with httpd. If I execute the following I can see that root works, but other users do not:

As root there is no error:
perl -e 'use DBD::Oracle'

As a user there is an error:
perl -e 'use DBD::Oracle' Can't locate loadable object for module DBD::Oracle in @INC (@INC cont +ains: /usr/local/lib64/perl5/5.32 /usr/local/share/perl5/5.32 /usr/li +b64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 / +usr/share/perl5) at -e line 1. Compilation failed in require at -e line 1. BEGIN failed--compilation aborted at -e line 1.

In reply to Can't locate loadable object for module DBD::Oracle in @INC by Calab

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.