红联Linux门户
Linux帮助

ubuntu15.04下安装cx-Oracle报错command 'x86_64-linux-gnu-gcc'

发布时间:2016-11-16 15:21:08来源:linux网站作者:Ben67
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
 
本文永久更新地址:http://www.linuxdiyf.com/linux/26050.html