I am trying to install cx_Oracle on my Mac Mavericks. 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
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
Instant Client Package - SQL Plus: Additional libraries and executable for running SQL Plus with Instant Client
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
pip setup.py install
ld: file not found: 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
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.