我正在尝试在AIX服务器中配置unixODBC。但是我收到错误消息,提示驱动程序管理器无法打开lib:找不到文件。
Oracle客户端已安装在服务器中,并且sqlpus可以在同一服务器上正常运行。
Oracle版本:12c(12.2) UnixODBC:2.3.7
我适当地编辑了odbc.ini和odbcinst.ini,并设置了环境变量:ORACLE_HOME,LD_LIBRARY_PATH,PATH,TNS_ADMIN等。
当我尝试执行isql时,出现以下错误:
**bash-4.4$ isql -v ORCL**
[01000][unixODBC][Driver Manager]Can't open lib '/XXXX/oracle/app/client/lib/libsqora.so' : file not found
[ISQL]ERROR: Could not SQLConnect
在很多博客和互联网上,我都做得很糟糕:
**bash-4.4$ ldd /XXXX/oracle/app/client/lib/libsqora.so**
/XXXX/oracle/app/client/lib/libsqora.so needs:
/usr/lib/libodbcinst.a(libodbcinst.so.2)
ar: 0707-109 Member name libodbcinst.so.2 does not exist.
dump: /tmp/tmpdir19988686/extract/libodbcinst.so.2: 0654-106 Cannot open the specified file.
/XXXX/oracle/app/client/lib/libclntsh.so
/XXXX/oracle/app/client/lib/libclntshcore.so
/usr/lib/libc.a(shr.o)
/usr/lib/librtl.a(shr.o)
/unix
/usr/lib/libperfstat.a(shr.o)
/usr/lib/libpthreads.a(shr_xpg5.o)
/usr/lib/libc.a(aio.o)
/usr/lib/libdl.a(shr.o)
/XXXX/oracle/app/client/lib/libons.so
/usr/lib/libodm.a(shr.o)
/usr/lib/libcrypt.a(shr.o)
/usr/lib/libcfg.a(shr.o)
/usr/lib/liblvm.a(shr.o)
/usr/lib/libcorcfg.a(shr.o)
/usr/lib/libpthreads.a(shr_comm.o)
/usr/lib/libsrc.a(shr.o)
我被困在这里,关于如何破解并使其工作的任何想法?
bash-4.4$ ar tv /usr/lib/libodbcinst.a
rwxr-xr-x 205/1 316902 Feb 07 13:36 2018 libodbcinst.so
在新的AIX服务器中新安装会引发相同的错误:
bash-4.4$ isql -v ORCL
[01000][unixODBC][Driver Manager]Can't open lib '/XXX/oracle/app/client/lib/libsqora.so' : file not found
[ISQL]ERROR: Could not SQLConnect
但是Ldd看起来还不错:
bash-4.4$ ldd /XXX/oracle/app/client/lib/libsqora.so
/XXX/oracle/app/client/lib/libsqora.so needs:
/opt/freeware/lib/libodbcinst.a(libodbcinst.so.2)
/XXX/oracle/app/client/lib/libclntsh.so
/XXX/oracle/app/client/lib/libclntshcore.so
/usr/lib/libc.a(shr.o)
/usr/lib/librtl.a(shr.o)
/unix
/opt/freeware/lib/libltdl.so
/usr/lib/libpthread.a(shr_xpg5.o)
/usr/lib/libperfstat.a(shr.o)
/usr/lib/libpthreads.a(shr_xpg5.o)
/usr/lib/libc.a(aio.o)
/usr/lib/libdl.a(shr.o)
/XXX/oracle/app/client/lib/libons.so
/usr/lib/libodm.a(shr.o)
/usr/lib/libcrypt.a(shr.o)
/opt/freeware/lib/libgcc_s.a(shr.o)
/usr/lib/libpthreads.a(shr_comm.o)
/usr/lib/libcfg.a(shr.o)
/usr/lib/liblvm.a(shr.o)
/usr/lib/libcorcfg.a(shr.o)
/usr/lib/libsrc.a(shr.o)
bash-4.4$ ar tv /opt/freeware/lib/libodbcinst.a
rwxr-xr-x 205/1 316902 Feb 07 13:36 2018 libodbcinst.so
rwxr-xr-x 209/1 316902 Aug 28 11:14 2019 libodbcinst.so.2
bash-4.4$ ls /opt/freeware/lib/
gcc libfreebl3.a libgthread-2.0.a libncurses++.so libodbc.so.2.0.0 libpopt.so.0 libsoftokn3.a
gettext libfreebl3.so libgthread-2.0.so libncurses++.so.6 libodbccr.a libpopt.so.0.0.0 libsoftokn3.so
libatomic.a libgcc_s.a libgthread-2.0.so.0 libncurses++.so.6.1.0 libodbccr.so libpython2.7.a libsqlite3.a
libbz2.a libgdbm.a libhistory.a libncurses.a libodbccr.so.2 libpython2.7.so libsqlite3.so
libcharset.a libgettextlib-0.19.8.1.a libhistory.so.6 libncurses.so libodbccr.so.2.0.0 libreadline.a libssl3.a
libcharset.la libgettextlib.a libiconv.a libncurses.so.6 libodbcinst.a libreadline.so.6 libssl3.so
libdb-4.8.a libgettextsrc-0.19.8.1.a libiconv.la libncurses.so.6.1.0 libodbcinst.a.bak librpm.so libstdc++.a
libdb-4.8.so libgettextsrc.a libintl.a libnspr4.a libodbcinst.so librpm.so.7 libz.a
libdb-4.a libgio-2.0.a libltdl.a libnspr4.so libodbcinst.so.2 librpm.so.7.0.1 pthread
libdb-4.so libgio-2.0.so libltdl.so libnss3.a libodbcinst.so.2.0.0 librpmbuild.so python2.7
libdb.a libgio-2.0.so.0 libltdl.so.7 libnss3.so libpanel.a librpmbuild.so.7 rpm
libdb.so libglib-2.0.a libltdl.so.7.3.1 libnssckbi.a libpanel.so librpmbuild.so.7.0.1 rpm40
libdb4.a libglib-2.0.so liblua-5.1.so libnssckbi.so libpanel.so.6 librpmio.so rpmpopt
libexpat.a libglib-2.0.so.0 liblua.a libnssdbm3.a libpanel.so.6.1.0 librpmio.so.7 rpmrc
libffi.a libgmodule-2.0.a libmagic.a libnssdbm3.so libplc4.a librpmio.so.7.0.1 terminfo
libffi.so.6 libgmodule-2.0.so libmenu.a libnssutil3.a libplc4.so librpmsign.so
libform.a libgmodule-2.0.so.0 libmenu.so libnssutil3.so libplds4.a librpmsign.so.7
libform.so libgobject-2.0.a libmenu.so.6 libodbc.a libplds4.so librpmsign.so.7.0.1
libform.so.6 libgobject-2.0.so libmenu.so.6.1.0 libodbc.so libpopt.a libsmime3.a
libform.so.6.1.0 libgobject-2.0.so.0 libncurses++.a libodbc.so.2 libpopt.so libsmime3.so