[英]installation of cx_oracle fails
I am trying to install cx_Oracle on my Mac Mavericks. 我正在尝试在Mac Mavericks上安装cx_Oracle。 Met with the following error.
遇到以下错误。 Any help, please.
请帮忙。
The sequence is: 顺序为:
sudo easy_install cx_Oracle
...
Processing cx_Oracle-5.1.2.tar.gz
Writing /tmp/easy_install-eFOU_a/cx_Oracle-5.1.2/setup.cfg
Running cx_Oracle-5.1.2/setup.py -q bdist_egg --dist-dir /tmp/easy_install-eFOU_a/cx_Oracle-5.1.2/egg-dist-tmp-g2eCKt
ld: file not found: crt3.o
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: Setup script exited with error: command '/usr/bin/clang' failed with exit status 1
I did not dig deeply but I found some workaround for this issue. 我没有深入研究,但是找到了解决此问题的方法。 I cloned repo from https://bitbucket.org/anthony_tuininga/cx_oracle and ran
我从https://bitbucket.org/anthony_tuininga/cx_oracle克隆了回购并运行
python setup.py build
Got an error: 出现错误:
/usr/bin/clang -bundle -undefined dynamic_lookup -L/usr/local/opt/readline/lib build/temp.macosx-10.4-x86_64-2.7-11g/cx_Oracle.o -L/opt/instantclient_11_2 -lclntsh -o build/lib.macosx-10.4-x86_64-2.7-11g/cx_Oracle.so -shared-libgcc
ld: file not found: crt3.o
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: command '/usr/bin/clang' failed with exit status 1
After that I just copy & paste the command from output 之后,我只需复制并粘贴输出中的命令
/usr/bin/clang -bundle -undefined dynamic_lookup -L/usr/local/opt/readline/lib build/temp.macosx-10.4-x86_64-2.7-11g/cx_Oracle.o -L/opt/instantclient_11_2 -lclntsh -o build/lib.macosx-10.4-x86_64-2.7-11g/cx_Oracle.so -shared-libgcc
And ran 跑了
python setup.py install
SUDDENLY egg has been successfully installed. 突然,鸡蛋已成功安装。
Hope this helps. 希望这可以帮助。
Instant Client Package - Basic: All files required to run OCI, OCCI
即时客户端软件包-基本:运行OCI,OCCI所需的所有文件
Instant Client Package - SQL Plus: Additional libraries and executable for running SQL Plus with Instant Client
Instant Client程序包-SQL Plus:用于通过Instant Client 运行SQL Plus的其他库和可执行文件
export DYLD_LIBRARY_PATH=/Users/myUserName/Desktop/ORA_CLIENT/oracle_client export LD_LIBRARY_PATH=$LD_LIBRARY_PATH: /Users/myUserName/Desktop/ORA_CLIENT/oracle_client
导出DYLD_LIBRARY_PATH = /用户/ myUserName /桌面/ ORA_CLIENT / oracle_client导出LD_LIBRARY_PATH = $ LD_LIBRARY_PATH:/ Users / myUserName / Desktop / ORA_CLIENT / oracle_client
pip setup.py install
pip setup.py安装
ld: file not found: crt3.o
ld:找不到文件:crt3.o
gcc -bundle -undefined dynamic_lookup build/temp.macosx-10.4-x86_64-2.7-11g/cx_Oracle.o -L/Users/myUserName/Desktop/ORA_CLIENT/oracle_client -lclntsh -o build/lib.macosx-10.4-x86_64-2.7-11g/cx_Oracle.so -shared-libgcc
gcc-捆绑-未定义dynamic_lookup build / temp.macosx-10.4-x86_64-2.7-11g / cx_Oracle.o -L / Users / myUserName / Desktop / ORA_CLIENT / oracle_client -lclntsh -o build / lib.macosx-10.4-x86_64-2.7 -11g / cx_Oracle.so -shared-libgcc
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.