1、安装cx_oracle1)下载cx_Oracle,https://pypi.python.org/pypi2)解压压缩包3)执行Python setup.py install执行后报错:error: c
1、安装cx_oracle
1)下载cx_Oracle,https://pypi.python.org/pypi
2)解压压缩包
3)执行Python setup.py install
执行后报错:error: command 'GCc' failed with exit status 1
排查:
1)检查是否安装oracle客户端软件
2)查看当前环境变量中是否配置oracle的相关变量,如echo $ORACLE_HOME
3)如果没有配置需要将oracle环境变量配置到当前用户.bash_profile中,或/etc/profile中
# cat .bash_profile
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1
export ORA_CRS_HOME=$ORACLE_BASE/product/10.2.0/crs_1
export ORACLE_SID=icpdb
export PATH=.:${PATH}:$HOME/bin:$ORACLE_HOME/bin:$ORA_CRS_HOME/bin
export PATH=${PATH}:/usr/bin:/bin:/usr/bin/X11:/usr/local/bin
export ORACLE_TERM=xterm
export TNS_ADMIN=$ORACLE_HOME/network/admin
export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$ORACLE_HOME/oracm/lib
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/lib:/usr/lib:/usr/local/lib
export CLASSPATH=$ORACLE_HOME/JRE
export CLASSPATH=${CLASSPATH}:$ORACLE_HOME/jlib
export CLASSPATH=${CLASSPATH}:$ORACLE_HOME/rdbms/jlib
export CLASSPATH=${CLASSPATH}:$ORACLE_HOME/network/jlib
export THREADS_FLAG=native
export DISPLAY=192.168.196.5:0.0
export NLS_LANG="AMERICAN_AMERICA.ZHS16GBK"
--结束END--
本文标题: 安装cx_Oracle时报错:error: command 'gcc' failed with exit status 1
本文链接: https://lsjlt.com/news/37803.html(转载时请注明来源链接)
有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341
2024-10-23
2024-10-22
2024-10-22
2024-10-22
2024-10-22
2024-10-22
2024-10-22
2024-10-22
2024-10-22
2024-10-22
回答
回答
回答
回答
回答
回答
回答
回答
回答
回答
0