欢迎使用CSDN-markdown编辑器

来源:互联网 发布:mac photoshop 编辑:程序博客网 时间:2024/06/05 22:42

ubuntu15.04下安装cx-Oracle报错:
x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wl,-Bsymbolic-functions -Wl,-z,relro -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security build/temp.linux-x86_64-2.7-11g/cx_Oracle.o -L/home/ben/software/oracle_cli -lclntsh -o build/lib.linux-x86_64-2.7-11g/cx_Oracle.so
/usr/bin/ld: cannot find -lclntsh
collect2: error: ld returned 1 exit status
error: command ‘x86_64-linux-gnu-gcc’ failed with exit status 1
解决方法:
1,查看本机是否有libclntsh.so
sudo find / -name libclntsh*
2,如果有则将其复制到/usr/lib下,没有则自行从网上下载
sudo cp ~/software/oracle_cli/libclntsh.so.11.1 /usr/lib
3,建立链接
sudo ln -s libclntsh.so.11.1 libclntsh.so

0 0
原创粉丝点击