在centos上安装cx-oracle和dev-tools

时间:2019-04-02 13:28:29

标签: python django pip centos cx-oracle

我们有一个var1 var2 var3 var4 var5 var6 mexico argentina england germany null null mexico argentina italy null null null mexico argentina italy spain england null mexico argentina italy spain null null spain null null null null null mexico argentina italy spain england germany 项目正在Ubuntu 14.04上运行。由于14.04即将结束,因此出于特定原因我们要迁移到CentOS(7)。

运行(python2.7/django-1.10)

时,出现以下错误。
pip install -r requirements.txt

然后摆弄一些东西,我尝试使用以下命令安装Installing collected packages: cx-Oracle, Django, python-openid, requests, oauthlib, requests-oauthlib, django-allauth, django-angular, sqlparse, django-debug-toolbar, django-debug-toolbar-request-history, django-debug-toolbar-template-profiler, django-debug-toolbar-template-timings, djangorestframework, execnet, greenlet, gevent, gunicorn, meld3, pyasn1, pyOpenSSL, ndg-httpsclient, ntlm-auth, pytz, xmltodict, requests-ntlm, pywinrm, sh, supervisor Running setup.py install for cx-Oracle ... error Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-JZMDHk/cx-Oracle/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-stOsUC/install-record.txt --single-version-externally-managed --compile: running install running build running build_ext building 'cx_Oracle' extension creating build creating build/temp.linux-x86_64-2.7-11g gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/u01/app/oracle/product/11.2.0/xe/rdbms/demo -I/u01/app/oracle/product/11.2.0/xe/rdbms/public -I/usr/include/python2.7 -c cx_Oracle.c -o build/temp.linux-x86_64-2.7-11g/cx_Oracle.o -DBUILD_VERSION=5.2.1 unable to execute gcc: No such file or directory error: command 'gcc' failed with exit status 1 ---------------------------------------- Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-JZMDHk/cx-Oracle/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-stOsUC/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-JZMDHk/cx-Oracle/

gcc

,输出为

yum install gcc  

因此,基本的问题是我想安装Failed to set locale, defaulting to C Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile github_git-lfs/x86_64/signature | 833 B 00:00:00 github_git-lfs/x86_64/signature | 1.0 kB 00:00:00 !!! github_git-lfs-source/signature | 833 B 00:00:00 github_git-lfs-source/signature | 1.0 kB 00:00:00 !!! Resolving Dependencies --> Running transaction check ... ... ... ... Error: Package: glibc-devel-2.17-196.el7_4.2.x86_64 (ultra-centos-7.4-updates) Requires: glibc = 2.17-196.el7_4.2 Installed: glibc-2.17-222.el7.x86_64 (installed) glibc = 2.17-222.el7 Available: glibc-2.17-196.el7.x86_64 (ultra-centos-7.4-base) glibc = 2.17-196.el7 Available: glibc-2.17-196.el7_4.2.x86_64 (ultra-centos-7.4-updates) glibc = 2.17-196.el7_4.2 You could try using --skip-broken to work around the problem You could try running: rpm -Va --nofiles --nodigest 来构建和安装dev-tools,但由于某种原因我无法安装它。

在CentOS上是否需要做任何特殊的事情。

cx-Oracle

百胜润色

yum list glibc*
Failed to set locale, defaulting to C
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Installed Packages
glibc.x86_64                                    2.17-222.el7                                installed               
glibc-common.x86_64                             2.17-222.el7                                installed               
Available Packages
glibc-devel.x86_64                              2.17-196.el7_4.2                            ultra-centos-7.4-updates
glibc-headers.x86_64                            2.17-196.el7_4.2                            ultra-centos-7.4-updates
glibc-static.x86_64                             2.17-196.el7_4.2                            ultra-centos-7.4-updates
glibc-utils.x86_64                              2.17-196.el7_4.2                            ultra-centos-7.4-updates

0 个答案:

没有答案