免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2483 | 回复: 0
打印 上一主题 下一主题

[Ansible] 无法安装cryptography [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2017-01-22 21:18 |只看该作者 |倒序浏览
本帖最后由 kellyseeme123 于 2017-01-22 21:23 编辑

在安装ansible的时候,需要安装cryptography,但是无法安装,怎么解决呢????:已经安装相关包,如下:
  1. <div>[root@RHanible ~]# python -V</div><div>Python 2.7.11</div><div>[root@RHanible ~]# cat /etc/redhat-release </div><div>Red Hat Enterprise Linux Server release 6.2 (Santiago)</div><div>error: ^[python-devel$: regcomp failed: Invalid range end</div><div>[root@RHanible ~]# rpm -qa python-devel</div><div>python-devel-2.6.6-29.el6.x86_64</div><div>[root@RHanible ~]# rpm -qa openssl-devel</div><div>openssl-devel-1.0.0-20.el6.x86_64</div>
复制代码


报错为下:

  1. <div>[root@RHanible install]# pip install cryptography-1.7.1.tar.gz </div><div>Processing ./cryptography-1.7.1.tar.gz</div><div>Requirement already satisfied (use --upgrade to upgrade): idna>=2.0 in /usr/local/python/lib/python2.7/site-packages (from cryptography==1.7.1)</div><div>Requirement already satisfied (use --upgrade to upgrade): pyasn1>=0.1.8 in /usr/local/python/lib/python2.7/site-packages (from cryptography==1.7.1)</div><div>Requirement already satisfied (use --upgrade to upgrade): six>=1.4.1 in /usr/local/python/lib/python2.7/site-packages (from cryptography==1.7.1)</div><div>Requirement already satisfied (use --upgrade to upgrade): setuptools>=11.3 in /usr/local/python/lib/python2.7/site-packages (from cryptography==1.7.1)</div><div>Requirement already satisfied (use --upgrade to upgrade): enum34 in /usr/local/python/lib/python2.7/site-packages (from cryptography==1.7.1)</div><div>Requirement already satisfied (use --upgrade to upgrade): ipaddress in /usr/local/python/lib/python2.7/site-packages (from cryptography==1.7.1)</div><div>Requirement already satisfied (use --upgrade to upgrade): cffi>=1.4.1 in /usr/local/python/lib/python2.7/site-packages (from cryptography==1.7.1)</div><div>Requirement already satisfied (use --upgrade to upgrade): pycparser in /usr/local/python/lib/python2.7/site-packages (from cffi>=1.4.1->cryptography==1.7.1)</div><div>Installing collected packages: cryptography</div><div>  Running setup.py install for cryptography ... error</div><div>    Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-8LBwp4-build/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-JbVlK7-record/install-record.txt --single-version-externally-managed --compile:</div><div>    running install</div><div>    running build</div><div>    running build_py</div><div>    creating build</div><div>    creating build/lib.linux-x86_64-2.7</div><div>    creating build/lib.linux-x86_64-2.7/cryptography</div><div>    copying src/cryptography/__about__.py -> build/lib.linux-x86_64-2.7/cryptography</div><div>    copying src/cryptography/fernet.py -> build/lib.linux-x86_64-2.7/cryptography</div><div>    copying src/cryptography/utils.py -> build/lib.linux-x86_64-2.7/cryptography</div><div>    copying src/cryptography/__init__.py -> build/lib.linux-x86_64-2.7/cryptography</div><div>    copying src/cryptography/exceptions.py -> build/lib.linux-x86_64-2.7/cryptography</div><div>    creating build/lib.linux-x86_64-2.7/cryptography/hazmat</div><div>    copying src/cryptography/hazmat/__init__.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat</div><div>    creating build/lib.linux-x86_64-2.7/cryptography/x509</div><div>    copying src/cryptography/x509/oid.py -> build/lib.linux-x86_64-2.7/cryptography/x509</div><div>    copying src/cryptography/x509/general_name.py -> build/lib.linux-x86_64-2.7/cryptography/x509</div><div>    copying src/cryptography/x509/extensions.py -> build/lib.linux-x86_64-2.7/cryptography/x509</div><div>    copying src/cryptography/x509/__init__.py -> build/lib.linux-x86_64-2.7/cryptography/x509</div><div>    copying src/cryptography/x509/name.py -> build/lib.linux-x86_64-2.7/cryptography/x509</div><div>    copying src/cryptography/x509/base.py -> build/lib.linux-x86_64-2.7/cryptography/x509</div><div>    creating build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives</div><div>    copying src/cryptography/hazmat/primitives/cmac.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives</div><div>    copying src/cryptography/hazmat/primitives/constant_time.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives</div><div>    copying src/cryptography/hazmat/primitives/keywrap.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives</div><div>    copying src/cryptography/hazmat/primitives/hmac.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives</div><div>    copying src/cryptography/hazmat/primitives/__init__.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives</div><div>    copying src/cryptography/hazmat/primitives/padding.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives</div><div>    copying src/cryptography/hazmat/primitives/serialization.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives</div><div>    copying src/cryptography/hazmat/primitives/hashes.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives</div><div>    creating build/lib.linux-x86_64-2.7/cryptography/hazmat/backends</div><div>    copying src/cryptography/hazmat/backends/multibackend.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/backends</div><div>    copying src/cryptography/hazmat/backends/interfaces.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/backends</div><div>    copying src/cryptography/hazmat/backends/__init__.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/backends</div><div>    creating build/lib.linux-x86_64-2.7/cryptography/hazmat/bindings</div><div>    copying src/cryptography/hazmat/bindings/__init__.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/bindings</div><div>    creating build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/twofactor</div><div>    copying src/cryptography/hazmat/primitives/twofactor/hotp.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/twofactor</div><div>    copying src/cryptography/hazmat/primitives/twofactor/utils.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/twofactor</div><div>    copying src/cryptography/hazmat/primitives/twofactor/__init__.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/twofactor</div><div>    copying src/cryptography/hazmat/primitives/twofactor/totp.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/twofactor</div><div>    creating build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/ciphers</div><div>    copying src/cryptography/hazmat/primitives/ciphers/modes.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/ciphers</div><div>    copying src/cryptography/hazmat/primitives/ciphers/algorithms.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/ciphers</div><div>    copying src/cryptography/hazmat/primitives/ciphers/__init__.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/ciphers</div><div>    copying src/cryptography/hazmat/primitives/ciphers/base.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/ciphers</div><div>    creating build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/interfaces</div><div>    copying src/cryptography/hazmat/primitives/interfaces/__init__.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/interfaces</div><div>    creating build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/asymmetric</div><div>    copying src/cryptography/hazmat/primitives/asymmetric/ec.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/asymmetric</div><div>    copying src/cryptography/hazmat/primitives/asymmetric/dsa.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/asymmetric</div><div>    copying src/cryptography/hazmat/primitives/asymmetric/utils.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/asymmetric</div><div>    copying src/cryptography/hazmat/primitives/asymmetric/dh.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/asymmetric</div><div>    copying src/cryptography/hazmat/primitives/asymmetric/rsa.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/asymmetric</div><div>    copying src/cryptography/hazmat/primitives/asymmetric/__init__.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/asymmetric</div><div>    copying src/cryptography/hazmat/primitives/asymmetric/padding.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/asymmetric</div><div>    creating build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/kdf</div><div>    copying src/cryptography/hazmat/primitives/kdf/pbkdf2.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/kdf</div><div>    copying src/cryptography/hazmat/primitives/kdf/hkdf.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/kdf</div><div>    copying src/cryptography/hazmat/primitives/kdf/kbkdf.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/kdf</div><div>    copying src/cryptography/hazmat/primitives/kdf/scrypt.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/kdf</div><div>    copying src/cryptography/hazmat/primitives/kdf/concatkdf.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/kdf</div><div>    copying src/cryptography/hazmat/primitives/kdf/x963kdf.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/kdf</div><div>    copying src/cryptography/hazmat/primitives/kdf/__init__.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/primitives/kdf</div><div>    creating build/lib.linux-x86_64-2.7/cryptography/hazmat/backends/openssl</div><div>    copying src/cryptography/hazmat/backends/openssl/x509.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/backends/openssl</div><div>    copying src/cryptography/hazmat/backends/openssl/cmac.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/backends/openssl</div><div>    copying src/cryptography/hazmat/backends/openssl/ec.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/backends/openssl</div><div>    copying src/cryptography/hazmat/backends/openssl/ciphers.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/backends/openssl</div><div>    copying src/cryptography/hazmat/backends/openssl/dsa.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/backends/openssl</div><div>    copying src/cryptography/hazmat/backends/openssl/utils.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/backends/openssl</div><div>    copying src/cryptography/hazmat/backends/openssl/backend.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/backends/openssl</div><div>    copying src/cryptography/hazmat/backends/openssl/hmac.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/backends/openssl</div><div>    copying src/cryptography/hazmat/backends/openssl/dh.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/backends/openssl</div><div>    copying src/cryptography/hazmat/backends/openssl/rsa.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/backends/openssl</div><div>    copying src/cryptography/hazmat/backends/openssl/__init__.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/backends/openssl</div><div>    copying src/cryptography/hazmat/backends/openssl/decode_asn1.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/backends/openssl</div><div>    copying src/cryptography/hazmat/backends/openssl/hashes.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/backends/openssl</div><div>    copying src/cryptography/hazmat/backends/openssl/encode_asn1.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/backends/openssl</div><div>    creating build/lib.linux-x86_64-2.7/cryptography/hazmat/backends/commoncrypto</div><div>    copying src/cryptography/hazmat/backends/commoncrypto/ciphers.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/backends/commoncrypto</div><div>    copying src/cryptography/hazmat/backends/commoncrypto/backend.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/backends/commoncrypto</div><div>    copying src/cryptography/hazmat/backends/commoncrypto/hmac.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/backends/commoncrypto</div><div>    copying src/cryptography/hazmat/backends/commoncrypto/__init__.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/backends/commoncrypto</div><div>    copying src/cryptography/hazmat/backends/commoncrypto/hashes.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/backends/commoncrypto</div><div>    creating build/lib.linux-x86_64-2.7/cryptography/hazmat/bindings/openssl</div><div>    copying src/cryptography/hazmat/bindings/openssl/_conditional.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/bindings/openssl</div><div>    copying src/cryptography/hazmat/bindings/openssl/binding.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/bindings/openssl</div><div>    copying src/cryptography/hazmat/bindings/openssl/__init__.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/bindings/openssl</div><div>    creating build/lib.linux-x86_64-2.7/cryptography/hazmat/bindings/commoncrypto</div><div>    copying src/cryptography/hazmat/bindings/commoncrypto/binding.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/bindings/commoncrypto</div><div>    copying src/cryptography/hazmat/bindings/commoncrypto/__init__.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/bindings/commoncrypto</div><div>    running egg_info</div><div>    writing requirements to src/cryptography.egg-info/requires.txt</div><div>    writing src/cryptography.egg-info/PKG-INFO</div><div>    writing top-level names to src/cryptography.egg-info/top_level.txt</div><div>    writing dependency_links to src/cryptography.egg-info/dependency_links.txt</div><div>    writing entry points to src/cryptography.egg-info/entry_points.txt</div><div>    reading manifest file 'src/cryptography.egg-info/SOURCES.txt'</div><div>    reading manifest template 'MANIFEST.in'</div><div>    no previously-included directories found matching 'docs/_build'</div><div>    warning: no previously-included files matching '*' found under directory 'vectors'</div><div>    writing manifest file 'src/cryptography.egg-info/SOURCES.txt'</div><div>    running build_ext</div><div>    generating cffi module 'build/temp.linux-x86_64-2.7/_padding.c'</div><div>    creating build/temp.linux-x86_64-2.7</div><div>    generating cffi module 'build/temp.linux-x86_64-2.7/_constant_time.c'</div><div>    generating cffi module 'build/temp.linux-x86_64-2.7/_openssl.c'</div><div>    building '_openssl' extension</div><div>    creating build/temp.linux-x86_64-2.7/build</div><div>    creating build/temp.linux-x86_64-2.7/build/temp.linux-x86_64-2.7</div><div>    gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/usr/local/python/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</div><div>    build/temp.linux-x86_64-2.7/_openssl.c:2078: warning: function declaration isn?. a prototype</div><div>    build/temp.linux-x86_64-2.7/_openssl.c:2079: warning: function declaration isn?. a prototype</div><div>    build/temp.linux-x86_64-2.7/_openssl.c:2080: warning: function declaration isn?. a prototype</div><div>    build/temp.linux-x86_64-2.7/_openssl.c:2105: warning: function declaration isn?. a prototype</div><div>    build/temp.linux-x86_64-2.7/_openssl.c:2163: warning: function declaration isn?. a prototype</div><div>    build/temp.linux-x86_64-2.7/_openssl.c: In function ?.cffi_const_CMS_DEBUG_DECRYPT?.</div><div>    build/temp.linux-x86_64-2.7/_openssl.c:8193: error: ?.MS_DEBUG_DECRYPT?.undeclared (first use in this function)</div><div>    build/temp.linux-x86_64-2.7/_openssl.c:8193: error: (Each undeclared identifier is reported only once</div><div>    build/temp.linux-x86_64-2.7/_openssl.c:8193: error: for each function it appears in.)</div><div>    error: command 'gcc' failed with exit status 1</div><div>    </div><div>    ----------------------------------------</div><div>Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-8LBwp4-build/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-JbVlK7-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-8LBwp4-build/</div>
复制代码




您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP