2015-08-24 324 views
1

下午好,odoo安裝失敗在CentOS 6.7(命令 「PIP安裝pyopenssl」)

我試着去odoo CRM安裝到一個CentOS 6.7最小VM(RamNode)。我下面的指南:

https://odootricks.wordpress.com/2014/09/30/installing-odoo-8-on-centos-6-with-virtual-python-install/

所以Python 2.7將與altinstall選項來安裝,一切都將在virtualenv中。

一切正常,直到安裝pyopenssl。 「點子安裝pyopenssl」命令失敗,我haven`t能夠使它發揮作用......

已經嘗試過手動安裝加密,更新setuptools的,更新的點子,等並沒有什麼似乎工作...

,我已經嘗試了更多鈔票的解決方案:

pip install -U pip 
pip install -U setuptools 
yum install pyOpenSSL 
yum install gcc libffi-devel python-devel openssl-devel 
pip install --upgrade Distribute 
yum -y install python-pip 

我真的沒辦法了,試圖在這裏,任何幫助將是非常讚賞。

(odoo)[[email protected] ~]$ pip install cryptography 
Collecting cryptography 
/home/odoo/odoo/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:90: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning. 
    InsecurePlatformWarning 
    Using cached cryptography-1.0.tar.gz 
Requirement already satisfied (use --upgrade to upgrade): idna>=2.0 in ./odoo/lib/python2.7/site-packages (from cryptography) 
Requirement already satisfied (use --upgrade to upgrade): pyasn1>=0.1.8 in ./odoo/lib/python2.7/site-packages (from cryptography) 
Requirement already satisfied (use --upgrade to upgrade): six>=1.4.1 in ./odoo/lib/python2.7/site-packages (from cryptography) 
Requirement already satisfied (use --upgrade to upgrade): setuptools in ./odoo/lib/python2.7/site-packages/setuptools-18.2-py2.7.egg (from cryptography) 
Requirement already satisfied (use --upgrade to upgrade): enum34 in ./odoo/lib/python2.7/site-packages (from cryptography) 
Requirement already satisfied (use --upgrade to upgrade): ipaddress in ./odoo/lib/python2.7/site-packages (from cryptography) 
Requirement already satisfied (use --upgrade to upgrade): cffi>=1.1.0 in ./odoo/lib/python2.7/site-packages (from cryptography) 
Requirement already satisfied (use --upgrade to upgrade): pycparser in ./odoo/lib/python2.7/site-packages (from cffi>=1.1.0->cryptography) 
Building wheels for collected packages: cryptography 
    Running setup.py bdist_wheel for cryptography 
    Complete output from command /home/odoo/odoo/bin/python2.7 -c "import setuptools;__file__='/tmp/pip-build-Xoq8de/cryptography/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" bdist_wheel -d /tmp/tmpEfTxmepip-wheel-: 
    running bdist_wheel 
    running build 
    running build_py 
    creating build 
    creating build/lib.linux-x86_64-2.7 
    creating build/lib.linux-x86_64-2.7/cryptography 
    copying src/cryptography/__init__.py -> build/lib.linux-x86_64-2.7/cryptography 
    copying src/cryptography/__about__.py -> build/lib.linux-x86_64-2.7/cryptography 
    copying src/cryptography/exceptions.py -> build/lib.linux-x86_64-2.7/cryptography 
    copying src/cryptography/utils.py -> build/lib.linux-x86_64-2.7/cryptography 
    copying src/cryptography/fernet.py -> build/lib.linux-x86_64-2.7/cryptography 
    creating build/lib.linux-x86_64-2.7/cryptography/x509 
    copying src/cryptography/x509/general_name.py -> build/lib.linux-x86_64-2.7/cryptography/x509 
    copying src/cryptography/x509/__init__.py -> build/lib.linux-x86_64-2.7/cryptography/x509 
    copying src/cryptography/x509/base.py -> build/lib.linux-x86_64-2.7/cryptography/x509 
    copying src/cryptography/x509/name.py -> build/lib.linux-x86_64-2.7/cryptography/x509 
    copying src/cryptography/x509/oid.py -> build/lib.linux-x86_64-2.7/cryptography/x509 
    copying src/cryptography/x509/extensions.py -> build/lib.linux-x86_64-2.7/cryptography/x509 
    creating build/lib.linux-x86_64-2.7/cryptography/hazmat 
    copying src/cryptography/hazmat/__init__.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat 
    creating build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives 
    copying src/cryptography/hazmat/primitives/hmac.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives 
    copying src/cryptography/hazmat/primitives/constant_time.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives 
    copying src/cryptography/hazmat/primitives/__init__.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives 
    copying src/cryptography/hazmat/primitives/cmac.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives 
    copying src/cryptography/hazmat/primitives/serialization.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives 
    copying src/cryptography/hazmat/primitives/padding.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives 
    copying src/cryptography/hazmat/primitives/hashes.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives 
    creating build/lib.linux-x86_64-2.7/cryptography/hazmat/backends 
    copying src/cryptography/hazmat/backends/__init__.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/backends 
    copying src/cryptography/hazmat/backends/interfaces.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/backends 
    copying src/cryptography/hazmat/backends/multibackend.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/backends 
    creating build/lib.linux-x86_64-2.7/cryptography/hazmat/bindings 
    copying src/cryptography/hazmat/bindings/__init__.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/bindings 
    creating build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/interfaces 
    copying src/cryptography/hazmat/primitives/interfaces/__init__.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/interfaces 
    creating build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/twofactor 
    copying src/cryptography/hazmat/primitives/twofactor/__init__.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/twofactor 
    copying src/cryptography/hazmat/primitives/twofactor/utils.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/twofactor 
    copying src/cryptography/hazmat/primitives/twofactor/totp.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/twofactor 
    copying src/cryptography/hazmat/primitives/twofactor/hotp.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/twofactor 
    creating build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/kdf 
    copying src/cryptography/hazmat/primitives/kdf/__init__.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/kdf 
    copying src/cryptography/hazmat/primitives/kdf/pbkdf2.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/kdf 
    copying src/cryptography/hazmat/primitives/kdf/concatkdf.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/kdf 
    copying src/cryptography/hazmat/primitives/kdf/hkdf.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/kdf 
    creating build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/ciphers 
    copying src/cryptography/hazmat/primitives/ciphers/__init__.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/ciphers 
    copying src/cryptography/hazmat/primitives/ciphers/modes.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/ciphers 
    copying src/cryptography/hazmat/primitives/ciphers/base.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/ciphers 
    copying src/cryptography/hazmat/primitives/ciphers/algorithms.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/ciphers 
    creating build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/asymmetric 
    copying src/cryptography/hazmat/primitives/asymmetric/dsa.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/asymmetric 
    copying src/cryptography/hazmat/primitives/asymmetric/dh.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/asymmetric 
    copying src/cryptography/hazmat/primitives/asymmetric/__init__.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/asymmetric 
    copying src/cryptography/hazmat/primitives/asymmetric/rsa.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/asymmetric 
    copying src/cryptography/hazmat/primitives/asymmetric/padding.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/asymmetric 
    copying src/cryptography/hazmat/primitives/asymmetric/utils.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/asymmetric 
    copying src/cryptography/hazmat/primitives/asymmetric/ec.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/asymmetric 
    creating build/lib.linux-x86_64-2.7/cryptography/hazmat/backends/commoncrypto 
    copying src/cryptography/hazmat/backends/commoncrypto/hmac.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/backends/commoncrypto 
    copying src/cryptography/hazmat/backends/commoncrypto/backend.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/backends/commoncrypto 
    copying src/cryptography/hazmat/backends/commoncrypto/__init__.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/backends/commoncrypto 
    copying src/cryptography/hazmat/backends/commoncrypto/ciphers.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/backends/commoncrypto 
    copying src/cryptography/hazmat/backends/commoncrypto/hashes.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/backends/commoncrypto 
    creating build/lib.linux-x86_64-2.7/cryptography/hazmat/backends/openssl 
    copying src/cryptography/hazmat/backends/openssl/dsa.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/backends/openssl 
    copying src/cryptography/hazmat/backends/openssl/hmac.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/backends/openssl 
    copying src/cryptography/hazmat/backends/openssl/backend.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/backends/openssl 
    copying src/cryptography/hazmat/backends/openssl/__init__.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/backends/openssl 
    copying src/cryptography/hazmat/backends/openssl/rsa.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/backends/openssl 
    copying src/cryptography/hazmat/backends/openssl/cmac.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/backends/openssl 
    copying src/cryptography/hazmat/backends/openssl/x509.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/backends/openssl 
    copying src/cryptography/hazmat/backends/openssl/utils.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/backends/openssl 
    copying src/cryptography/hazmat/backends/openssl/ciphers.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/backends/openssl 
    copying src/cryptography/hazmat/backends/openssl/ec.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/backends/openssl 
    copying src/cryptography/hazmat/backends/openssl/hashes.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/backends/openssl 
    creating build/lib.linux-x86_64-2.7/cryptography/hazmat/bindings/commoncrypto 
    copying src/cryptography/hazmat/bindings/commoncrypto/__init__.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/bindings/commoncrypto 
    copying src/cryptography/hazmat/bindings/commoncrypto/binding.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/bindings/commoncrypto 
    creating build/lib.linux-x86_64-2.7/cryptography/hazmat/bindings/openssl 
    copying src/cryptography/hazmat/bindings/openssl/__init__.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/bindings/openssl 
    copying src/cryptography/hazmat/bindings/openssl/binding.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/bindings/openssl 
    copying src/cryptography/hazmat/bindings/openssl/_conditional.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/bindings/openssl 
    running egg_info 
    writing requirements to src/cryptography.egg-info/requires.txt 
    writing src/cryptography.egg-info/PKG-INFO 
    writing top-level names to src/cryptography.egg-info/top_level.txt 
    writing dependency_links to src/cryptography.egg-info/dependency_links.txt 
    writing entry points to src/cryptography.egg-info/entry_points.txt 
    warning: manifest_maker: standard file '-c' not found 

    reading manifest file 'src/cryptography.egg-info/SOURCES.txt' 
    reading manifest template 'MANIFEST.in' 
    no previously-included directories found matching 'docs/_build' 
    warning: no previously-included files matching '*' found under directory 'vectors' 
    writing manifest file 'src/cryptography.egg-info/SOURCES.txt' 
    running build_ext 
    generating cffi module 'build/temp.linux-x86_64-2.7/_padding.c' 
    creating build/temp.linux-x86_64-2.7 
    generating cffi module 'build/temp.linux-x86_64-2.7/_constant_time.c' 
    generating cffi module 'build/temp.linux-x86_64-2.7/_openssl.c' 
    building '_openssl' extension 
    creating build/temp.linux-x86_64-2.7/build 
    creating build/temp.linux-x86_64-2.7/build/temp.linux-x86_64-2.7 
    gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/usr/local/include/python2.7 -c build/temp.linux-x86_64-2.7/_openssl.c -o build/temp.linux-x86_64-2.7/build/temp.linux-x86_64-2.7/_openssl.o 
    build/temp.linux-x86_64-2.7/_openssl.c:1735: warning: function declaration isn’t a prototype 
    gcc: Internal error: Killed (program cc1) 
    Please submit a full bug report. 
    See <http://bugzilla.redhat.com/bugzilla> for instructions. 
    error: command 'gcc' failed with exit status 1 

    ---------------------------------------- 
    Failed building wheel for cryptography 
Failed to build cryptography 
Installing collected packages: cryptography 
    Running setup.py install for cryptography 
    Complete output from command /home/odoo/odoo/bin/python2.7 -c "import setuptools, tokenize;__file__='/tmp/pip-build-Xoq8de/cryptography/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-d1Fqxd-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/odoo/odoo/include/site/python2.7/cryptography: 
    running install 
    running build 
    running build_py 
    running egg_info 
    writing requirements to src/cryptography.egg-info/requires.txt 
    writing src/cryptography.egg-info/PKG-INFO 
    writing top-level names to src/cryptography.egg-info/top_level.txt 
    writing dependency_links to src/cryptography.egg-info/dependency_links.txt 
    writing entry points to src/cryptography.egg-info/entry_points.txt 
    warning: manifest_maker: standard file '-c' not found 

    reading manifest file 'src/cryptography.egg-info/SOURCES.txt' 
    reading manifest template 'MANIFEST.in' 
    no previously-included directories found matching 'docs/_build' 
    warning: no previously-included files matching '*' found under directory 'vectors' 
    writing manifest file 'src/cryptography.egg-info/SOURCES.txt' 
    running build_ext 
    generating cffi module 'build/temp.linux-x86_64-2.7/_padding.c' 
    already up-to-date 
    generating cffi module 'build/temp.linux-x86_64-2.7/_constant_time.c' 
    already up-to-date 
    generating cffi module 'build/temp.linux-x86_64-2.7/_openssl.c' 
    building '_openssl' extension 
    gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/usr/local/include/python2.7 -c build/temp.linux-x86_64-2.7/_openssl.c -o build/temp.linux-x86_64-2.7/build/temp.linux-x86_64-2.7/_openssl.o 
    build/temp.linux-x86_64-2.7/_openssl.c:1735: warning: function declaration isn’t a prototype 
    gcc: Internal error: Killed (program cc1) 
    Please submit a full bug report. 
    See <http://bugzilla.redhat.com/bugzilla> for instructions. 
    error: command 'gcc' failed with exit status 1 

    ---------------------------------------- 
Command "/home/odoo/odoo/bin/python2.7 -c "import setuptools, tokenize;__file__='/tmp/pip-build-Xoq8de/cryptography/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-d1Fqxd-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/odoo/odoo/include/site/python2.7/cryptography" failed with error code 1 in /tmp/pip-build-Xoq8de/cryptography 
+0

你有沒有機會移動virtualenv目錄? 另外檢查這個問題的答案http://stackoverflow.com/questions/11094718/error-command-gcc-failed-with-exit-status-1-while-installing-eventlet你可能需要sudo python-devel包。 – Maikflow

+0

已經安裝了python-devel作爲root用戶,我不認爲我移動了virtualenv目錄......事情是我已經在虛擬環境(VirtualBox測試機器)中完成了它,但是在我的生產服務器上卻無法使它成爲 –

回答

0

這聽起來像你可能需要用你的包管理器,sudo apt-get install或equivelent到同時安裝OpenSSL和OpenSSL的-DEV(可能爲超級用戶)。

+0

已經安裝 –

+0

'蔭將OpenSSL安裝的openssl-devel的 加載插件:fastestmirror 設置從緩存HOSTFILE 安裝過程 加載鏡速度*基:centos.mia.host-engine.com * EPEL:reflector.westga.edu * extras:reflector.westga.edu *更新:cosmos.cites.illinois.edu 軟件包openssl-1.0.1e-42.el6.x86_64已安裝且最新版本 軟件包openssl-devel-1.0.1e-42.el6 .x86_64已經安裝和最新版本 沒事做' –