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

I realize there are myriad threads around asking this same question but I haven't found anything that ties into my specific situation in any of them.

Many of them suggest using perl -e 'use DBI' as a method of testing if it's loaded. In my circumstance this tests successfully for the root user but when I try it as the pc8admin (Informatica) user I get the Can't locate loadable object.

I don't see anything in their paths or environment that would explain this and I've verified with which perl that they are using the same executable. I've also made sure to chmod so that they were read/executable by world just in case that was the problem.

  • Comment on DBI Can't locate loadable object for Module

Replies are listed 'Best First'.
Re: DBI Can't locate loadable object for Module
by runrig (Abbot) on Jun 13, 2012 at 22:01 UTC
    Execute as root:
    perldoc -l DBI
    Where is DBI installed? Find the auto directory in the same directory. What permissions are on it and the auto/DBI/* files? Then:
    perl -V
    What paths are in INC at the end of the output? Execute the same command above as pc8admin. Are the same paths included? Does pc8admin have read permission on all the necessary files (and I think execute on the *.so file)?
      /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/DBI.pm

      perms are rwxr-xr-x for the file. the auto/DBI is drwx------ so I will change that. the files inside auto/DBI are read only (for all) except for the DBI.so which is r-xr-xr-x

      Paths are identical.

      Sorry for the delay in responding--had to run some errands. I will change the directory and retest. Thanks for the quick reply!

      *edit* Changing the directories fixed it. That was easy. Thanks for the command that showed where it was installed that was especially helpful as we had 7 or 8 DBI.pm floating around.

Re: DBI Can't locate loadable object for Module
by Anonymous Monk on Jun 14, 2012 at 06:13 UTC
Re: DBI Can't locate loadable object for Module
by choroba (Cardinal) on Jun 13, 2012 at 21:47 UTC
    Has the other user the right to connect to the database?