我正在尝试将基本的Flask应用程序部署到Heroku。
之前我已经完成了一个工作,但是现在我已经添加了SSH,它将不会部署。
这是我的sqr'
:
requirements.txt
heroku构建日志是:
Flask==0.12.2
Gunicorn==19.7.1
parallel-ssh==1.2.0
似乎安装了很多其他依赖项,这很好。但它以某种方式找不到-----> Python app detected
-----> Installing requirements with pip
Collecting parallel-ssh==1.2.0 (from -r /tmp/build_42797fa48b085347364495c1df641f74/SnelleJelle-divulge-c28ba875636d44db493b3f331420150355401c3c/requirements.txt (line 3))
Downloading parallel_ssh-1.2.0-cp36-cp36m-manylinux1_x86_64.whl (1.6MB)
Collecting ssh2-python>=0.6.0 (from parallel-ssh==1.2.0->-r /tmp/build_42797fa48b085347364495c1df641f74/SnelleJelle-divulge-c28ba875636d44db493b3f331420150355401c3c/requirements.txt (line 3))
Downloading ssh2-python-0.7.0.post2.tar.gz (438kB)
Collecting paramiko<2.2 (from parallel-ssh==1.2.0->-r /tmp/build_42797fa48b085347364495c1df641f74/SnelleJelle-divulge-c28ba875636d44db493b3f331420150355401c3c/requirements.txt (line 3))
Downloading paramiko-2.1.4-py2.py3-none-any.whl (173kB)
Collecting gevent>=1.1 (from parallel-ssh==1.2.0->-r /tmp/build_42797fa48b085347364495c1df641f74/SnelleJelle-divulge-c28ba875636d44db493b3f331420150355401c3c/requirements.txt (line 3))
Downloading gevent-1.2.2-cp36-cp36m-manylinux1_x86_64.whl (1.7MB)
Collecting pyasn1>=0.1.7 (from paramiko<2.2->parallel-ssh==1.2.0->-r /tmp/build_42797fa48b085347364495c1df641f74/SnelleJelle-divulge-c28ba875636d44db493b3f331420150355401c3c/requirements.txt (line 3))
Downloading pyasn1-0.4.2-py2.py3-none-any.whl (71kB)
Collecting cryptography>=1.1 (from paramiko<2.2->parallel-ssh==1.2.0->-r /tmp/build_42797fa48b085347364495c1df641f74/SnelleJelle-divulge-c28ba875636d44db493b3f331420150355401c3c/requirements.txt (line 3))
Downloading cryptography-2.1.4-cp36-cp36m-manylinux1_x86_64.whl (2.2MB)
Collecting greenlet>=0.4.10 (from gevent>=1.1->parallel-ssh==1.2.0->-r /tmp/build_42797fa48b085347364495c1df641f74/SnelleJelle-divulge-c28ba875636d44db493b3f331420150355401c3c/requirements.txt (line 3))
Downloading greenlet-0.4.12-cp36-cp36m-manylinux1_x86_64.whl (42kB)
Collecting six>=1.4.1 (from cryptography>=1.1->paramiko<2.2->parallel-ssh==1.2.0->-r /tmp/build_42797fa48b085347364495c1df641f74/SnelleJelle-divulge-c28ba875636d44db493b3f331420150355401c3c/requirements.txt (line 3))
Downloading six-1.11.0-py2.py3-none-any.whl
Collecting asn1crypto>=0.21.0 (from cryptography>=1.1->paramiko<2.2->parallel-ssh==1.2.0->-r /tmp/build_42797fa48b085347364495c1df641f74/SnelleJelle-divulge-c28ba875636d44db493b3f331420150355401c3c/requirements.txt (line 3))
Downloading asn1crypto-0.24.0-py2.py3-none-any.whl (101kB)
Collecting idna>=2.1 (from cryptography>=1.1->paramiko<2.2->parallel-ssh==1.2.0->-r /tmp/build_42797fa48b085347364495c1df641f74/SnelleJelle-divulge-c28ba875636d44db493b3f331420150355401c3c/requirements.txt (line 3))
Downloading idna-2.6-py2.py3-none-any.whl (56kB)
Collecting cffi>=1.7; platform_python_implementation != "PyPy" (from cryptography>=1.1->paramiko<2.2->parallel-ssh==1.2.0->-r /tmp/build_42797fa48b085347364495c1df641f74/SnelleJelle-divulge-c28ba875636d44db493b3f331420150355401c3c/requirements.txt (line 3))
Downloading cffi-1.11.2-cp36-cp36m-manylinux1_x86_64.whl (419kB)
Collecting pycparser (from cffi>=1.7; platform_python_implementation != "PyPy"->cryptography>=1.1->paramiko<2.2->parallel-ssh==1.2.0->-r /tmp/build_42797fa48b085347364495c1df641f74/SnelleJelle-divulge-c28ba875636d44db493b3f331420150355401c3c/requirements.txt (line 3))
Downloading pycparser-2.18.tar.gz (245kB)
Installing collected packages: ssh2-python, pyasn1, six, asn1crypto, idna, pycparser, cffi, cryptography, paramiko, greenlet, gevent, parallel-ssh
Running setup.py install for ssh2-python: started
Running setup.py install for ssh2-python: finished with status 'error'
Complete output from command /app/.heroku/python/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-xqi26x3e/ssh2-python/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-yn7ewtm4-record/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.6
creating build/lib.linux-x86_64-3.6/ssh2
copying ssh2/_version.py -> build/lib.linux-x86_64-3.6/ssh2
copying ssh2/__init__.py -> build/lib.linux-x86_64-3.6/ssh2
running egg_info
writing ssh2_python.egg-info/PKG-INFO
writing dependency_links to ssh2_python.egg-info/dependency_links.txt
writing top-level names to ssh2_python.egg-info/top_level.txt
reading manifest file 'ssh2_python.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'ssh2_python.egg-info/SOURCES.txt'
copying ssh2/agent.c -> build/lib.linux-x86_64-3.6/ssh2
copying ssh2/channel.c -> build/lib.linux-x86_64-3.6/ssh2
copying ssh2/error_codes.c -> build/lib.linux-x86_64-3.6/ssh2
copying ssh2/exceptions.c -> build/lib.linux-x86_64-3.6/ssh2
copying ssh2/fileinfo.c -> build/lib.linux-x86_64-3.6/ssh2
copying ssh2/listener.c -> build/lib.linux-x86_64-3.6/ssh2
copying ssh2/pkey.c -> build/lib.linux-x86_64-3.6/ssh2
copying ssh2/publickey.c -> build/lib.linux-x86_64-3.6/ssh2
copying ssh2/session.c -> build/lib.linux-x86_64-3.6/ssh2
copying ssh2/sftp.c -> build/lib.linux-x86_64-3.6/ssh2
copying ssh2/sftp_handle.c -> build/lib.linux-x86_64-3.6/ssh2
copying ssh2/statinfo.c -> build/lib.linux-x86_64-3.6/ssh2
copying ssh2/utils.c -> build/lib.linux-x86_64-3.6/ssh2
running build_ext
building 'ssh2.pkey' extension
creating build/temp.linux-x86_64-3.6
creating build/temp.linux-x86_64-3.6/ssh2
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -Ilibssh2/include -I/app/.heroku/python/include/python3.6m -c ssh2/pkey.c -o build/temp.linux-x86_64-3.6/ssh2/pkey.o -O3
ssh2/pkey.c:527:21: fatal error: libssh2.h: No such file or directory
compilation terminated.
error: command 'gcc' failed with exit status 1
----------------------------------------
Command "/app/.heroku/python/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-xqi26x3e/ssh2-python/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-yn7ewtm4-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-xqi26x3e/ssh2-python/
! Push rejected, failed to compile Python app.
! Push failed
。
我该怎么办?