Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Error installing cx_Oracle Times: error: command & # 39; failed with exit status 1

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

1. Install cx_Oracle

1) download cx_Oracle, https://pypi.python.org/pypi

2) decompress the compressed package

3) execute python setup.py install

Error report after execution: error: command 'gcc' failed with exit status 1

Troubleshooting:

1) check if oracle client software is installed

2) check whether the relevant variables of oracle are configured in the current environment variables, such as echo $ORACLE_HOME

3) if there is no configuration, you need to configure the oracle environment variable to the current user .bash _ profile, or / 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"

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report