LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Red Hat (http://www.linuxquestions.org/questions/red-hat-31/)
-   -   DBD::ODBC works as root but not as non-root user on CentOS5 - any ideas? (http://www.linuxquestions.org/questions/red-hat-31/dbd-odbc-works-as-root-but-not-as-non-root-user-on-centos5-any-ideas-818824/)

prgupta 07-09-2010 01:15 AM

DBD::ODBC works as root but not as non-root user on CentOS5 - any ideas?
 
vert1:/home/dbadmin $ perl tempread.pl
install_driver(ODBC) failed: Can't load '/usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/auto/DBD/ODBC/ODBC.so' for module DBD::ODBC: libodbc.so.1: cannot open shared object file: No such file or directory at /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/DynaLoader.pm line 230.

And as root on same machine everything works fine:
root@vert1:/usr/local# perl /home/dbadmin/tempread.pl
1
2

Any ideas?

chrism01 07-09-2010 02:20 AM

Sounds like your Perl @INC (uincluded modules dirs) list is different for each user. Try
Code:

#!/usr/bin/perl
# lookinc - where to look for modules

$"="\n";

print "@INC\n";

as each user. Adjust she-bang line in script as reqd.
Also check 'which perl' if you are calling it as your qn suggests.

prgupta 07-13-2010 01:20 AM

Closed - issue was that my LD_LIBRARY_PATH env var was not set correctly.


All times are GMT -5. The time now is 03:41 AM.