我已经在Ubuntu上安装了Oracle Instant Client 11.2.0.4,并且已经设置了Oracle环境变量,并且SQL * Plus正在运行,但运行命令“pip install cx_oracle”失败。
完整的错误消息是:
~$ pip install cx_Oracle
Collecting cx-Oracle
Using cached cx_Oracle-5.2.1.tar.gz
Building wheels for collected packages: cx-Oracle
Running setup.py bdist_wheel for cx-Oracle ... error
Complete output from command /home/snyder/anaconda3/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-v_mqkgu3/cx-Oracle/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" bdist_wheel -d /tmp/tmpewk056lgpip-wheel- --python-tag cp35:
running bdist_wheel
running build
running build_ext
building 'cx_Oracle' extension
creating build
creating build/temp.linux-x86_64-3.5-11g
gcc -pthread -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/usr/include/oracle/11.2/client64 -I/home/snyder/anaconda3/include/python3.5m -c cx_Oracle.c -o build/temp.linux-x86_64-3.5-11g/cx_Oracle.o -DBUILD_VERSION=5.2.1
In file included from /usr/include/oracle/11.2/client64/oci.h:3045:0,
from cx_Oracle.c:10:
/usr/include/oracle/11.2/client64/ociap.h:10795:1: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
void OCIThreadProcessInit();
^
/usr/include/oracle/11.2/client64/ociap.h:10801:1: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
boolean OCIThreadIsMulti();
^
In file included from Variable.c:176:0,
from Cursor.c:246,
from Connection.c:761,
from SessionPool.c:138,
from cx_Oracle.c:203:
ObjectVar.c: In function ‘ObjectVar_Initialize’:
ObjectVar.c:118:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (i = 0; i < self->allocatedElements; i++) {
^
ObjectVar.c: In function ‘ObjectVar_Finalize’:
ObjectVar.c:135:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (i = 0; i < self->allocatedElements; i++) {
^
In file included from Cursor.c:246:0,
from Connection.c:761,
from SessionPool.c:138,
from cx_Oracle.c:203:
Variable.c: In function ‘Variable_NewByOutputTypeHandler’:
Variable.c:926:32: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (var->allocatedElements < cursor->fetchArraySize) {
^
In file included from Connection.c:764:0,
from SessionPool.c:138,
from cx_Oracle.c:203:
Subscription.c: In function ‘MessageTable_Initialize’:
Subscription.c:451:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (i = 0; i < numRows; i++) {
^
Subscription.c: In function ‘MessageQuery_Initialize’:
Subscription.c:526:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (i = 0; i < numTables; i++) {
^
Subscription.c: In function ‘Message_Initialize’:
Subscription.c:618:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (i = 0; i < numTables; i++) {
^
Subscription.c:660:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (i = 0; i < numQueries; i++) {
^
cx_Oracle.c: In function ‘Variable_GetArrayValue’:
cx_Oracle.c:595:1: internal compiler error: 非法指令
}
^
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-5/README.Bugs> for instructions.
error: command 'gcc' failed with exit status 1
重要的一点似乎是(翻译错误):
cx_Oracle.c:595:1: internal compiler error: Illegal Instruction
}
^
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-5/README.Bugs> for instructions.
error: command 'gcc' failed with exit status 1
我该如何解决这个问题?