enter code here
我正在尝试在Linux服务器中安装paramiko模块。该pip在服务器上被阻止,因此我正在手动复制软件包zip并从setup.py安装它们
当我尝试安装paramiko时
error: Could not find suitable distribution for Requirement.parse('pynacl>=1.0.1')
所以我下载了PyNaCl软件包,但是我得到了
distutils.errors.DistutilsError: Could not find suitable distribution for Requirement.parse('cffi>=1.1.0')
pynacl需要cffi 1.1.0以上版本: 所以在安装cffi1.11.5时出现以下错误:
[root@homecffi-1.11.5]# python3.5 setup.py install
running install
---
---
installing library code to build/bdist.linux-x86_64/egg
--
--
building '_cffi_backend' extension
gcc -pthread -fno-strict-aliasing -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DUSE__THREAD -DHAVE_SYNC_SYNCHRONIZE -I/usr/local/lib/libffi-3.1/include -I/usr/local/include/python3.5m -c c/_cffi_backend.c -o build/temp.linux-x86_64-3.5/c/_cffi_backend.o
c/_cffi_backend.c: In function ‘b_callback’:
c/_cffi_backend.c:5911: warning: ‘ffi_prep_closure’ is deprecated (declared at /usr/local/include/ffi.h:341)
gcc -pthread -shared build/temp.linux-x86_64-3.5/c/_cffi_backend.o -L$(libdir)/../lib64 -lffi -o build/lib.linux-x86_64-3.5/_cffi_backend.cpython-35m-x86_64-linux-gnu.so
/usr/bin/ld: cannot find -lffi
collect2: ld returned 1 exit status
error: command 'gcc' failed with exit status 1
有人可以帮我吗?
答案 0 :(得分:1)
如果这是Debian或Ubuntu计算机,
sudo apt install libffi-dev
然后重试。
对于其他发行版,安装方法和软件包名称可能不同。