0
votes

install_driver(ODBC) failed:

Can't load '/usr/local/lib/perl5/auto/DBD/ODBC/ODBC.so' for module DBD::ODBC: libodbc.so.1: cannot open shared object file: No such file or directory at /usr/lib/perl5/DynaLoader.pm line 200. at (eval 3) line 3 Compilation failed in require at (eval 3) line 3. Perhaps a required shared library or dll isn't installed where expected at M_BLACKLIST.pl line 14

I have using latest unixodbc dbi drvier. Basically i use centos 6.

1
Are you sure you've installed the unixODBC Driver Manager package? Did you build DBD::ODBC yourself or did you install it via a package? - bohica
i have installed DBD::ODBC via package - user1363308
And did you install the unixodbc packages DBD::ODBC relies upon. I don't use Centos so I'm not sure what package manager it uses. The error you are getting says DBD::ODBC depends on the unixodbc driver manager shared object and it was not found in your dynamic linker path. You need libodbc.so (from the unixodbc package). Do ldd /usr/local/lib/perl5/auto/DBD/ODBC/ODBC.so and you'll see what shared objects it needs and what wasn't found. - bohica
Try typing "yum list installed" and pipe it into a grep -i unixodbc e.g. yum list installed | grep -i unixodbc. What does it output? - bohica
ldd /usr/local/lib/perl5/auto/DBD/ODBC/ODBC.so linux-gate.so.1 => (0x001a2000) libodbc.so.1 => not found libc.so.6 => /lib/libc.so.6 (0x003a0000) /lib/ld-linux.so.2 (0x00912000) - user1363308

1 Answers

0
votes

Just be aware, that the latest unixODBC build will create libodbc.so.2, the number was incremented after the SQLLEN change to the api a year or so ago May not be the problem, but worth checking what libodbc.so you actually have.