/root/.local/share/letsencrypt/include/site/python2.7/cffi" failed with error code 1


#1

[root@ip-172-31-2-103 letsencrypt]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.6 (Santiago)
[root@ip-172-31-2-103 letsencrypt]# ./letsencrypt-auto --verbose
Bootstrapping dependencies for RedHat-based OSes…
yum is /usr/bin/yum
Failed to set locale, defaulting to C
Loaded plugins: amazon-id, rhui-lb, security
Setting up Install Process
Package python-2.6.6-64.el6.x86_64 already installed and latest version
Package python-devel-2.6.6-64.el6.x86_64 already installed and latest version
Package python-virtualenv-1.10.1-1.el6.noarch already installed and latest version
Nothing to do
Failed to set locale, defaulting to C
Loaded plugins: amazon-id, rhui-lb, security
Setting up Install Process
Package git-1.7.1-3.el6_4.1.x86_64 already installed and latest version
Package gcc-4.4.7-16.el6.x86_64 already installed and latest version
Package dialog-1.1-9.20080819.1.el6.x86_64 already installed and latest version
Package augeas-libs-1.0.0-10.el6.x86_64 already installed and latest version
Package openssl-devel-1.0.1e-42.el6.x86_64 already installed and latest version
No package libffi-devel available.
Package redhat-rpm-config-9.0.3-44.el6.noarch already installed and latest version
Package ca-certificates-2015.2.4-65.0.1.el6_6.noarch already installed and latest version
Nothing to do
Creating virtual environment…
Running virtualenv with interpreter /usr/bin/python2.7
New python executable in /root/.local/share/letsencrypt/bin/python2.7
Also creating executable in /root/.local/share/letsencrypt/bin/python
Installing Setuptools…done.
Installing Pip…done.
Updating letsencrypt and virtual environment dependencies…
Downloading/unpacking setuptools from https://pypi.python.org/packages/source/s/setuptools/setuptools-18.7.1.tar.gz#md5=a0984da9cd8d7b582e1fd7de67dfdbcc
Downloading setuptools-18.7.1.tar.gz (628kB): 628kB downloaded
Running setup.py egg_info for package setuptools

Installing collected packages: setuptools
Found existing installation: setuptools 0.9.8
Uninstalling setuptools:
Successfully uninstalled setuptools
Running setup.py install for setuptools

Installing easy_install script to /root/.local/share/letsencrypt/bin
Installing easy_install-2.7 script to /root/.local/share/letsencrypt/bin

Successfully installed setuptools
Cleaning up…
Downloading/unpacking pip from https://pypi.python.org/packages/source/p/pip/pip-7.1.2.tar.gz#md5=3823d2343d9f3aaab21cf9c917710196
Downloading pip-7.1.2.tar.gz (1.0MB): 1.0MB downloaded
Running setup.py egg_info for package pip

warning: no previously-included files found matching '.coveragerc'
warning: no previously-included files found matching '.mailmap'
warning: no previously-included files found matching '.travis.yml'
warning: no previously-included files found matching 'pip/_vendor/Makefile'
warning: no previously-included files found matching 'tox.ini'
warning: no previously-included files found matching 'dev-requirements.txt'
no previously-included directories found matching '.travis'
no previously-included directories found matching 'docs/_build'
no previously-included directories found matching 'contrib'
no previously-included directories found matching 'tasks'
no previously-included directories found matching 'tests'

Installing collected packages: pip
Found existing installation: pip 1.4.1
Uninstalling pip:
Successfully uninstalled pip
Running setup.py install for pip

warning: no previously-included files found matching '.coveragerc'
warning: no previously-included files found matching '.mailmap'
warning: no previously-included files found matching '.travis.yml'
warning: no previously-included files found matching 'pip/_vendor/Makefile'
warning: no previously-included files found matching 'tox.ini'
warning: no previously-included files found matching 'dev-requirements.txt'
no previously-included directories found matching '.travis'
no previously-included directories found matching 'docs/_build'
no previously-included directories found matching 'contrib'
no previously-included directories found matching 'tasks'
no previously-included directories found matching 'tests'
Installing pip script to /root/.local/share/letsencrypt/bin
Installing pip2.7 script to /root/.local/share/letsencrypt/bin
Installing pip2 script to /root/.local/share/letsencrypt/bin

Successfully installed pip
Cleaning up…
Collecting letsencrypt
Using cached letsencrypt-0.1.0-py2-none-any.whl
Collecting letsencrypt-apache
Using cached letsencrypt_apache-0.1.0-py2-none-any.whl
Collecting ConfigArgParse from git+https://github.com/kuba/ConfigArgParse.git@python2.6-0.9.3#egg=ConfigArgParse (from -r ./py26reqs.txt (line 1))
Cloning https://github.com/kuba/ConfigArgParse.git (to python2.6-0.9.3) to /tmp/pip-build-Qd370u/ConfigArgParse
Collecting acme==0.1.0 (from letsencrypt)
Using cached acme-0.1.0-py2-none-any.whl
Requirement already up-to-date: setuptools in /root/.local/share/letsencrypt/lib/python2.7/site-packages (from letsencrypt)
Collecting python2-pythondialog>=3.2.2rc1 (from letsencrypt)
Using cached python2-pythondialog-3.3.0.tar.bz2
Collecting PyOpenSSL (from letsencrypt)
Using cached pyOpenSSL-0.15.1-py2.py3-none-any.whl
Collecting requests (from letsencrypt)
Using cached requests-2.8.1-py2.py3-none-any.whl
Collecting parsedatetime (from letsencrypt)
Using cached parsedatetime-1.5-py2-none-any.whl
Collecting configobj (from letsencrypt)
Using cached configobj-5.0.6.tar.gz
Collecting pytz (from letsencrypt)
Using cached pytz-2015.7-py2.py3-none-any.whl
Collecting psutil>=2.1.0 (from letsencrypt)
Using cached psutil-3.3.0.tar.gz
Collecting six (from letsencrypt)
Using cached six-1.10.0-py2.py3-none-any.whl
Collecting cryptography>=0.7 (from letsencrypt)
Using cached cryptography-1.1.1.tar.gz
Collecting zope.interface (from letsencrypt)
Using cached zope.interface-4.1.3.tar.gz
Collecting zope.component (from letsencrypt)
Using cached zope.component-4.2.2.tar.gz
Collecting mock (from letsencrypt)
Using cached mock-1.3.0-py2.py3-none-any.whl
Collecting pyrfc3339 (from letsencrypt)
Using cached pyRFC3339-1.0-py2.py3-none-any.whl
Collecting python-augeas (from letsencrypt-apache)
Using cached python-augeas-0.5.0.tar.gz
Collecting pyasn1 (from acme==0.1.0->letsencrypt)
Using cached pyasn1-0.1.9-py2.py3-none-any.whl
Collecting ndg-httpsclient (from acme==0.1.0->letsencrypt)
Using cached ndg_httpsclient-0.4.0.tar.gz
Collecting werkzeug (from acme==0.1.0->letsencrypt)
Using cached Werkzeug-0.11.2-py2.py3-none-any.whl
Collecting idna>=2.0 (from cryptography>=0.7->letsencrypt)
Using cached idna-2.0-py2.py3-none-any.whl
Collecting enum34 (from cryptography>=0.7->letsencrypt)
Using cached enum34-1.1.1.tar.gz
Collecting ipaddress (from cryptography>=0.7->letsencrypt)
Using cached ipaddress-1.0.15-py27-none-any.whl
Collecting cffi>=1.1.0 (from cryptography>=0.7->letsencrypt)
Using cached cffi-1.3.1.tar.gz
Collecting zope.event (from zope.component->letsencrypt)
Using cached zope.event-4.1.0.tar.gz
Collecting funcsigs (from mock->letsencrypt)
Using cached funcsigs-0.4-py2.py3-none-any.whl
Collecting pbr>=0.11 (from mock->letsencrypt)
Using cached pbr-1.8.1-py2.py3-none-any.whl
Collecting pycparser (from cffi>=1.1.0->cryptography>=0.7->letsencrypt)
Using cached pycparser-2.14.tar.gz
Installing collected packages: pytz, requests, pyasn1, idna, six, enum34, ipaddress, pycparser, cffi, cryptography, PyOpenSSL, ndg-httpsclient, werkzeug, funcsigs, pbr, mock, pyrfc3339, acme, python2-pythondialog, parsedatetime, configobj, psutil, zope.interface, zope.event, zope.component, ConfigArgParse, letsencrypt, python-augeas, letsencrypt-apache
Running setup.py install for enum34
Running setup.py install for pycparser
Running setup.py install for cffi
Complete output from command /root/.local/share/letsencrypt/bin/python2.7 -c “import setuptools, tokenize;file=’/tmp/pip-build-Qd370u/cffi/setup.py’;exec(compile(getattr(tokenize, ‘open’, open)(file).read().replace(’\r\n’, ‘\n’), file, ‘exec’))” install --record /tmp/pip-jGJmum-record/install-record.txt --single-version-externally-managed --compile --install-headers /root/.local/share/letsencrypt/include/site/python2.7/cffi:
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing libffi.pc' to the PKG_CONFIG_PATH environment variable No package 'libffi' found Package libffi was not found in the pkg-config search path. Perhaps you should add the directory containinglibffi.pc’
to the PKG_CONFIG_PATH environment variable
No package ‘libffi’ found
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing libffi.pc' to the PKG_CONFIG_PATH environment variable No package 'libffi' found Package libffi was not found in the pkg-config search path. Perhaps you should add the directory containinglibffi.pc’
to the PKG_CONFIG_PATH environment variable
No package ‘libffi’ found
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing `libffi.pc’
to the PKG_CONFIG_PATH environment variable
No package ‘libffi’ found
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
creating build/lib.linux-x86_64-2.7/cffi
copying cffi/cparser.py -> build/lib.linux-x86_64-2.7/cffi
copying cffi/model.py -> build/lib.linux-x86_64-2.7/cffi
copying cffi/lock.py -> build/lib.linux-x86_64-2.7/cffi
copying cffi/setuptools_ext.py -> build/lib.linux-x86_64-2.7/cffi
copying cffi/backend_ctypes.py -> build/lib.linux-x86_64-2.7/cffi
copying cffi/vengine_gen.py -> build/lib.linux-x86_64-2.7/cffi
copying cffi/commontypes.py -> build/lib.linux-x86_64-2.7/cffi
copying cffi/api.py -> build/lib.linux-x86_64-2.7/cffi
copying cffi/cffi_opcode.py -> build/lib.linux-x86_64-2.7/cffi
copying cffi/init.py -> build/lib.linux-x86_64-2.7/cffi
copying cffi/vengine_cpy.py -> build/lib.linux-x86_64-2.7/cffi
copying cffi/verifier.py -> build/lib.linux-x86_64-2.7/cffi
copying cffi/recompiler.py -> build/lib.linux-x86_64-2.7/cffi
copying cffi/gc_weakref.py -> build/lib.linux-x86_64-2.7/cffi
copying cffi/ffiplatform.py -> build/lib.linux-x86_64-2.7/cffi
copying cffi/_cffi_include.h -> build/lib.linux-x86_64-2.7/cffi
copying cffi/parse_c_type.h -> build/lib.linux-x86_64-2.7/cffi
running build_ext
building ‘_cffi_backend’ extension
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/c
gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DUSE__THREAD -I/usr/include/ffi -I/usr/include/libffi -I/usr/include/python2.7 -c c/_cffi_backend.c -o build/temp.linux-x86_64-2.7/c/_cffi_backend.o
c/_cffi_backend.c:13:17: error: ffi.h: No such file or directory
In file included from c/_cffi_backend.c:61:
c/malloc_closure.h:81: error: expected specifier-qualifier-list before 'ffi_closure’
c/malloc_closure.h: In function ‘more_core’:
c/malloc_closure.h:117: warning: division by zero
c/malloc_closure.h:149: error: ‘union mmaped_block’ has no member named 'next’
c/malloc_closure.h: At top level:
c/malloc_closure.h:158: error: expected ‘)’ before ‘’ token
c/malloc_closure.h:166: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before '
’ token
c/_cffi_backend.c:250: error: expected specifier-qualifier-list before 'ffi_cif’
c/_cffi_backend.c: In function ‘cdataowninggc_dealloc’:
c/_cffi_backend.c:1614: error: ‘ffi_closure’ undeclared (first use in this function)
c/_cffi_backend.c:1614: error: (Each undeclared identifier is reported only once
c/_cffi_backend.c:1614: error: for each function it appears in.)
c/_cffi_backend.c:1614: error: ‘closure’ undeclared (first use in this function)
c/_cffi_backend.c:1614: error: expected expression before ‘)’ token
c/_cffi_backend.c:1617: warning: implicit declaration of function 'cffi_closure_free’
c/_cffi_backend.c: In function ‘cdataowninggc_traverse’:
c/_cffi_backend.c:1634: error: ‘ffi_closure’ undeclared (first use in this function)
c/_cffi_backend.c:1634: error: ‘closure’ undeclared (first use in this function)
c/_cffi_backend.c:1634: error: expected expression before ‘)’ token
c/_cffi_backend.c: In function ‘cdataowninggc_clear’:
c/_cffi_backend.c:1654: error: ‘ffi_closure’ undeclared (first use in this function)
c/_cffi_backend.c:1654: error: ‘closure’ undeclared (first use in this function)
c/_cffi_backend.c:1654: error: expected expression before ‘)’ token
c/_cffi_backend.c: In function ‘cdataowninggc_repr’:
c/_cffi_backend.c:1842: error: ‘ffi_closure’ undeclared (first use in this function)
c/_cffi_backend.c:1842: error: expected expression before ‘)’ token
c/_cffi_backend.c: At top level:
c/_cffi_backend.c:2418: error: expected declaration specifiers or ‘…’ before 'ffi_abi’
c/_cffi_backend.c: In function ‘cdata_call’:
c/_cffi_backend.c:2547: error: ‘ffi_abi’ undeclared (first use in this function)
c/_cffi_backend.c:2547: error: expected ‘;’ before 'fabi’
c/_cffi_backend.c:2589: error: ‘fabi’ undeclared (first use in this function)
c/_cffi_backend.c:2593: error: too many arguments to function 'fb_prepare_cif’
c/_cffi_backend.c:2598: error: ‘cif_description_t’ has no member named 'exchange_size’
c/_cffi_backend.c:2608: error: ‘cif_description_t’ has no member named 'exchange_offset_arg’
c/_cffi_backend.c:2638: error: ‘cif_description_t’ has no member named 'exchange_offset_arg’
c/_cffi_backend.c:2643: warning: implicit declaration of function 'ffi_call’
c/_cffi_backend.c:2643: error: ‘cif_description_t’ has no member named 'cif’
c/_cffi_backend.c: In function ‘new_primitive_type’:
c/_cffi_backend.c:3765: error: ‘ffi_type’ undeclared (first use in this function)
c/_cffi_backend.c:3765: error: ‘ffitype’ undeclared (first use in this function)
c/_cffi_backend.c:3783: error: ‘ffi_type_sint8’ undeclared (first use in this function)
c/_cffi_backend.c:3784: error: ‘ffi_type_sint16’ undeclared (first use in this function)
c/_cffi_backend.c:3785: error: ‘ffi_type_sint32’ undeclared (first use in this function)
c/_cffi_backend.c:3786: error: ‘ffi_type_sint64’ undeclared (first use in this function)
c/_cffi_backend.c:3792: error: ‘ffi_type_float’ undeclared (first use in this function)
c/_cffi_backend.c:3794: error: ‘ffi_type_double’ undeclared (first use in this function)
c/_cffi_backend.c:3802: error: ‘ffi_type_longdouble’ undeclared (first use in this function)
c/_cffi_backend.c:3809: error: ‘ffi_type_uint8’ undeclared (first use in this function)
c/_cffi_backend.c:3810: error: ‘ffi_type_uint16’ undeclared (first use in this function)
c/_cffi_backend.c:3811: error: ‘ffi_type_uint32’ undeclared (first use in this function)
c/_cffi_backend.c:3812: error: ‘ffi_type_uint64’ undeclared (first use in this function)
c/_cffi_backend.c: At top level:
c/_cffi_backend.c:4448: error: expected specifier-qualifier-list before 'ffi_type’
c/_cffi_backend.c:4467: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘’ token
c/_cffi_backend.c: In function ‘fb_build’:
c/_cffi_backend.c:4607: error: ‘struct funcbuilder_s’ has no member named 'atypes’
c/_cffi_backend.c:4607: error: ‘ffi_type’ undeclared (first use in this function)
c/_cffi_backend.c:4607: error: expected expression before ‘)’ token
c/_cffi_backend.c:4608: error: ‘struct funcbuilder_s’ has no member named 'nargs’
c/_cffi_backend.c:4611: error: ‘struct funcbuilder_s’ has no member named 'rtype’
c/_cffi_backend.c:4611: warning: implicit declaration of function 'fb_fill_type’
c/_cffi_backend.c:4619: error: ‘cif_description_t’ has no member named 'exchange_offset_arg’
c/_cffi_backend.c:4622: error: ‘struct funcbuilder_s’ has no member named 'rtype’
c/_cffi_backend.c:4623: error: ‘ffi_arg’ undeclared (first use in this function)
c/_cffi_backend.c:4633: error: ‘atype’ undeclared (first use in this function)
c/_cffi_backend.c:4646: error: ‘struct funcbuilder_s’ has no member named 'atypes’
c/_cffi_backend.c:4647: error: ‘struct funcbuilder_s’ has no member named 'atypes’
c/_cffi_backend.c:4650: error: ‘cif_description_t’ has no member named 'exchange_offset_arg’
c/_cffi_backend.c:4657: error: ‘cif_description_t’ has no member named 'exchange_size’
c/_cffi_backend.c: In function ‘fb_build_name’:
c/_cffi_backend.c:4679: error: ‘struct funcbuilder_s’ has no member named 'nargs’
c/_cffi_backend.c:4696: error: ‘struct funcbuilder_s’ has no member named 'fct’
c/_cffi_backend.c:4698: error: ‘struct funcbuilder_s’ has no member named 'fct’
c/_cffi_backend.c: In function ‘fb_prepare_ctype’:
c/_cffi_backend.c:4739: error: ‘struct funcbuilder_s’ has no member named 'fct’
c/_cffi_backend.c:4749: error: ‘struct funcbuilder_s’ has no member named 'fct’
c/_cffi_backend.c: At top level:
c/_cffi_backend.c:4769: error: expected declaration specifiers or ‘…’ before 'ffi_abi’
c/_cffi_backend.c: In function ‘fb_prepare_cif’:
c/_cffi_backend.c:4796: warning: implicit declaration of function 'ffi_prep_cif’
c/_cffi_backend.c:4796: error: ‘cif_description_t’ has no member named 'cif’
c/_cffi_backend.c:4796: error: ‘fabi’ undeclared (first use in this function)
c/_cffi_backend.c:4796: error: ‘struct funcbuilder_s’ has no member named 'nargs’
c/_cffi_backend.c:4797: error: ‘struct funcbuilder_s’ has no member named 'rtype’
c/_cffi_backend.c:4797: error: ‘struct funcbuilder_s’ has no member named 'atypes’
c/_cffi_backend.c:4797: error: ‘FFI_OK’ undeclared (first use in this function)
c/_cffi_backend.c: In function ‘new_function_type’:
c/_cffi_backend.c:4841: error: too many arguments to function 'fb_prepare_cif’
c/_cffi_backend.c:4855: error: ‘struct funcbuilder_s’ has no member named 'nargs’
c/_cffi_backend.c:4865: error: ‘struct funcbuilder_s’ has no member named 'nargs’
c/_cffi_backend.c:4875: error: ‘struct funcbuilder_s’ has no member named 'nargs’
c/_cffi_backend.c:4878: error: ‘struct funcbuilder_s’ has no member named 'nargs’
c/_cffi_backend.c:4879: error: ‘struct funcbuilder_s’ has no member named 'nargs’
c/_cffi_backend.c:4881: error: ‘struct funcbuilder_s’ has no member named 'nargs’
c/_cffi_backend.c: In function ‘b_new_function_type’:
c/_cffi_backend.c:4892: error: ‘FFI_DEFAULT_ABI’ undeclared (first use in this function)
c/_cffi_backend.c: In function ‘convert_from_object_fficallback’:
c/_cffi_backend.c:4911: error: ‘ffi_arg’ undeclared (first use in this function)
c/_cffi_backend.c: At top level:
c/_cffi_backend.c:4986: error: expected ‘)’ before '
’ token
c/_cffi_backend.c: In function ‘b_callback’:
c/_cffi_backend.c:5093: error: ‘ffi_closure’ undeclared (first use in this function)
c/_cffi_backend.c:5093: error: ‘closure’ undeclared (first use in this function)
c/_cffi_backend.c:5120: error: ‘ffi_arg’ undeclared (first use in this function)
c/_cffi_backend.c:5138: warning: implicit declaration of function 'cffi_closure_alloc’
c/_cffi_backend.c:5156: warning: implicit declaration of function 'ffi_prep_closure’
c/_cffi_backend.c:5156: error: ‘cif_description_t’ has no member named 'cif’
c/_cffi_backend.c:5157: error: ‘invoke_callback’ undeclared (first use in this function)
c/_cffi_backend.c:5157: error: ‘FFI_OK’ undeclared (first use in this function)
In file included from c/cffi1_module.c:3,
from c/_cffi_backend.c:6366:
c/realize_c_type.c: In function ‘realize_c_type_or_func’:
c/realize_c_type.c:577: error: ‘FFI_DEFAULT_ABI’ undeclared (first use in this function)
c/_cffi_backend.c: In function ‘init_cffi_backend’:
c/_cffi_backend.c:6458: error: ‘FFI_DEFAULT_ABI’ undeclared (first use in this function)
error: command ‘gcc’ failed with exit status 1

----------------------------------------

Command “/root/.local/share/letsencrypt/bin/python2.7 -c “import setuptools, tokenize;file=’/tmp/pip-build-Qd370u/cffi/setup.py’;exec(compile(getattr(tokenize, ‘open’, open)(file).read().replace(’\r\n’, ‘\n’), file, ‘exec’))” install --record /tmp/pip-jGJmum-record/install-record.txt --single-version-externally-managed --compile --install-headers /root/.local/share/letsencrypt/include/site/python2.7/cffi” failed with error code 1 in /tmp/pip-build-Qd370u/cffi
[root@ip-172-31-2-103 letsencrypt]#


#2

So do you have Python2.7 already?

You can use this guide to get 2.7.9 (adjust your commands): https://www.digitalocean.com/community/tutorials/how-to-set-up-python-2-7-6-and-3-3-3-on-centos-6-4 Also setuptools can be setup like this: https://pypi.python.org/pypi/setuptools/18.7.1#unix-wget