I'm not sure LD_LIBRARY_PATH has anything to do with the direct loading of ODBC.so as the full path to it will be specified when the DynaLoader attempts to load it. More likely is that ODBC.so depends on something else that the dynamic linker cannot find. Try running ldd on /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/auto/DBD/ODBC/ODBC.so as root and non root users to look for a difference. You may need to add a path to say unixODBC libs etc to your dynamic linker configuration - see man ld.so. For example, on my machine:

$ ldd /usr/local/lib/perl/5.10.0/auto/DBD/ODBC/ODBC.so linux-gate.so.1 => (0x00694000) libodbc.so.1 => /usr/lib/libodbc.so.1 (0x00a87000) libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0x00223000) libltdl.so.7 => /usr/lib/libltdl.so.7 (0x003ad000) libpthread.so.0 => /lib/tls/i686/cmov/libpthread.so.0 (0x00f3e000) /lib/ld-linux.so.2 (0x00d18000) libdl.so.2 => /lib/tls/i686/cmov/libdl.so.2 (0x00567000)

One last thing to check is whether you are running SELinux.


In reply to Re^4: DBD::ODBC works as root but not as non-root user by mje
in thread DBD::ODBC works as root but not as non-root user by prgupta

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.