问题
I'm attempting to get Pervasive v10 client ODBC working on Centos 6. As I've learned, there is no 64 bit ODBC client so I have to use the 32 bit one. I've finally gotten it to install without error but attempting usage gives the following:
# isql -v mydsn
[01000][unixODBC][Driver Manager]Can't open lib '/usr/local/psql/lib/odbcci.so' : file not found
[ISQL]ERROR: Could not SQLConnect
ldd shows this:
# ldd /usr/local/psql/lib/odbcci.so
linux-gate.so.1 => (0x007d3000)
libpscore.so.3 => /usr/local/psql/lib/libpscore.so.3 (0x00c32000)
libpscl.so.3 => /usr/local/psql/lib/libpscl.so.3 (0x005f9000)
libuuid.so.1 => /lib/libuuid.so.1 (0x0076d000)
libpthread.so.0 => /lib/libpthread.so.0 (0x00110000)
libdl.so.2 => /lib/libdl.so.2 (0x003e0000)
libstdc++.so.6 => /usr/local/psql/lib/libstdc++.so.6 (0x0012b000)
libm.so.6 => /lib/libm.so.6 (0x00876000)
libgcc_s.so.1 => /usr/local/psql/lib/libgcc_s.so.1 (0x00434000)
libc.so.6 => /lib/libc.so.6 (0x00954000)
/lib/ld-linux.so.2 (0x00f70000)
回答1:
I just had a similar problem setting up ODBC and Pervasive for an Ubuntu client.
The reason it works after you su psql
is because they install a .bashrc
in the psql user account. The critical ingredient there for this question is export LD_LIBRARY_PATH=...
which tells the dynamic linker where to find the library.
The error in the comments regarding the SQL Connection Manager is one I ran into as well:
[08S01][unixODBC][Pervasive][ODBC Client Interface][Client LNA]The ODBC Client Interface cannot access the data source because SQL Connection Manager is not running at the specified port number. Contact your system administrator for assistance.
I think Pervasive wants its own copy of the odbc.ini in its own etc directory. That dsnadd
script probably does that. I didn't have dsnadd
in the 64bit install, but I added a symlink from /etc/odbc.ini
to /usr/local/psql/etc/odbc.ini
and it worked.
来源:https://stackoverflow.com/questions/11092840/pervasive-odbc-on-linux-error-01000unixodbcdriver-managercant-open-lib