我有一个简单的测试程序,当我跑我得到:
./hello: error while loading shared libraries: libaio.so.1: cannot open shared object file: No such file or directory
我链接这样的:
$(CC) $(CCFLAGS) -o hello hello.o -L../ocilib-3.9.3/src/.libs -L../instantclient_11_2 -locilib
我的LD_LIBRARY_PATH包含此:
LD_LIBRARY_PATH=../ocilib-3.9.3/src/.libs:../instantclient_11_2:/usr/lib
/ usr / lib目录如下所示:
Linux$ ls -l /usr/lib/libaio*
lrwxrwxrwx 1 root root 15 Nov 5 2008 /usr/lib/libaio.so.1 -> libaio.so.1.0.1
-rwxr-xr-x 1 root root 2632 Sep 16 2005 /usr/lib/libaio.so.1.0.0
-rwxr-xr-x 1 root root 2628 Sep 16 2005 /usr/lib/libaio.so.1.0.1
LDD打招呼的输出:
libocilib.so.3 => ../ocilib-3.9.3/src/.libs/libocilib.so.3 (0x0000002a95558000)
libc.so.6 => /lib64/tls/libc.so.6 (0x0000003811200000)
libclntsh.so.11.1 => ../instantclient_11_2/libclntsh.so.11.1 (0x0000002a956c4000)
/lib64/ld-linux-x86-64.so.2 (0x000000552aaaa000)
libnnz11.so => ../instantclient_11_2/libnnz11.so (0x0000002a97f56000)
libdl.so.2 => /lib64/libdl.so.2 (0x0000003811500000)
libm.so.6 => /lib64/tls/libm.so.6 (0x0000003811700000)
libpthread.so.0 => /lib64/tls/libpthread.so.0 (0x0000003811b00000)
libnsl.so.1 => /lib64/libnsl.so.1 (0x0000003819000000)
libaio.so.1 => not found
我希望我失去了一些东西简单在这里。 oracle的instantclient包似乎需要libaio的,但似乎要安装已经这么有什么问题呢?