我正在尝试在我的Mac Mavericks上安装cx_Oracle。遇到以下错误。请帮忙。
序列是:
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
答案 0 :(得分:1)
我没有深入挖掘,但我找到了解决此问题的方法。 我从https://bitbucket.org/anthony_tuininga/cx_oracle克隆了回购并运行了
python setup.py build
出现错误:
/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
之后我只是复制&从输出中粘贴命令
/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
跑了
python setup.py install
SUDDENLY蛋已成功安装。
希望这有帮助。
答案 1 :(得分:0)
Instant Client Package - Basic:运行OCI,OCCI所需的所有文件
Instant Client Package - SQL Plus:其他库和可执行文件 使用Instant Client运行SQL Plus
出口 DYLD_LIBRARY_PATH = /用户/名为myUsername /桌面/ ORA_CLIENT / oracle_client export LD_LIBRARY_PATH = $ LD_LIBRARY_PATH: /用户/名为myUsername /桌面/ ORA_CLIENT / oracle_client
pip setup.py install
ld:找不到文件:crt3.o
gcc -bundle -undefined dynamic_lookup 建立/ 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