ubuntu16.04下安装cx-Oracle报错:
x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -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,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*
sudo ln -s libclntsh.so.11.1 libclntsh.so
原文链接:https://www.f2er.com/ubuntu/356053.html