如何从PIP安装中纠正这些错误?

时间:2017-06-21 21:12:01

标签: python pip cpanel centos6 pyopenssl

我正在尝试通过pip install pyopenssl在运行cpanel的centos 6.9上部署pyopenssl。

我明白了:

File "/tmp/pip-build-SN_BEg/cryptography/cffi-1.10.0-py2.6-linux-x86_64.egg/cffi/api.py", line 46, in __init__
        import _cffi_backend as backend
    ImportError: /tmp/pip-build-SN_BEg/cryptography/cffi-1.10.0-py2.6-linux-x86_64.egg/_cffi_backend.so: failed to map segment from shared object: Operation not permitted

    ----------------------------------------
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-SN_BEg/cryptography/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-hecxL5-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-SN_BEg/cryptography/
[root@panel ~]#

任何帮助都将不胜感激。

在评论之后我跑了:

[root@panel ~]# sudo yum install gcc libffi-devel python-devel openssl-devel
Loaded plugins: fastestmirror, tsflags, universal-hooks
Setting up Install Process
Loading mirror speeds from cached hostfile
 * EA4: 85.13.201.2
 * cpanel-addons-production-feed: 85.13.201.2
 * atomic: www4.atomicorp.com
 * base: fr.mirror.babylon.network
 * epel: mirrors.coreix.net
 * extras: fr.mirror.babylon.network
 * ius: mirrors.ircam.fr
 * updates: fr.mirror.babylon.network
Package gcc-4.4.7-18.el6.x86_64 already installed and latest version
Package libffi-devel-3.0.5-3.2.el6.x86_64 already installed and latest version
Package python-devel-2.6.6-66.el6_8.x86_64 already installed and latest version
Package openssl-devel-1.0.1e-57.el6.x86_64 already installed and latest version
Nothing to do

1 个答案:

答案 0 :(得分:1)

您可能需要先安装这些依赖项

sudo yum install gcc libffi-devel python-devel openssl-devel

参考:https://cryptography.io/en/latest/installation/#building-cryptography-on-linux