简体   繁体   中英

install_driver(ODBC) failed: Can't load '/usr/local/lib64/perl5/auto/DBD/ODBC/ODBC.so' for module DBD::ODBC: libodbc.so.1

I'm using perl 5.10.1 my current server(centos 6.3). Whenever I execute Perl programs, I get following error:

install_driver(ODBC) failed: Can't load '/usr/local/lib64/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/lib64/perl5/DynaLoader.pm line 200.

When I perform following command:

[root@test]# ldd /usr/local/lib64/perl5/auto/DBD/ODBC/ODBC.so
linux-vdso.so.1 => (0x00007fffde569000)
libodbc.so.1 => not found
libc.so.6 => /lib64/libc.so.6 (0x00007f591e49a000)
/lib64/ld-linux-x86-64.so.2 (0x0000003d25e00000)

I get libodbc.so.1 is not found

You may need to install the C++ ODBC libraries. I had a similar issue when I was trying to use the XML::LibXML libraries. I my case I had to install the following C++ libraries on ubuntu. libxml2-dev libxml2

Here is a link to Ubuntu's package repository for libodbc. http://packages.ubuntu.com/hardy/libodbc++4

Hope that helps.

You need to install 64 bit versions (or build them yourself) of unixODBC and unixODBC-dev packages. I am surprised you've got DBD::ODBC installed without having them already as the build process needs them. So, the question is how did you install DBD::ODBC?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM