Installation via letsencrypt-auto fails with error code 1

Running Debian 8.2, I am trying to follow the instructions to install using letsencrypt-auto, but it hangsfor a while at “Updating letsencrypt and virtual environment dependencies…”. I get the following error message:

Command "/home/mvd/.local/share/letsencrypt/bin/python2.7 -c "import setuptools, tokenize;__file__='/tmp/user/1000/pip-build-p0CMhA/cryptography/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/user/1000/pip-pz5S01-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/mvd/.local/share/letsencrypt/include/site/python2.7/cryptography" failed with error code 1 in /tmp/user/1000/pip-build-p0CMhA/cryptography

Clearly the problem is somehow related to the cryptography module, but I can’t get it to give me more useful output. Furthermore, trying to use the --help option does nothing but try to run the virtualenv update step again, so I can’t even see if there is a way to print more verbose output.

Update 1: If I manually activate the letsencrypt virtualenv and pip install cryptography, it appears to work. So why does it fail if I don’t do this?

Update 2: I have tried to run the developer instructions for installing a local copy. At the ./bootstrap/dev/venv.sh step, I get another error, but this time with more verbosity:

    running build_ext
    generating cffi module 'build/temp.linux-x86_64-2.7/_padding.c'
    creating build/temp.linux-x86_64-2.7
    generating cffi module 'build/temp.linux-x86_64-2.7/_constant_time.c'
    generating cffi module 'build/temp.linux-x86_64-2.7/_openssl.c'
    building '_openssl' extension
    creating build/temp.linux-x86_64-2.7/build
    creating build/temp.linux-x86_64-2.7/build/temp.linux-x86_64-2.7
    x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/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
    x86_64-linux-gnu-gcc: internal compiler error: Killed (program cc1)
    Please submit a full bug report,
    with preprocessed source if appropriate.
    See <file:///usr/share/doc/gcc-4.9/README.Bugs> for instructions.
    error: command 'x86_64-linux-gnu-gcc' failed with exit status 4

Ran into the same problem.

After digging around I found the following helped resolve this issue, by creating an extra swap file:

My little VM only had 512 MB of RAM.

Many thanks - adding swap solved this same problem for me.

Adding a swap file didn’t help in my case.

What did help however, was removing the hidden installation directory:

rm -rf ~/.local/share/letsencrypt

Once that was done, letsencrypt did download on the next run the current dependencies and my process was running again.

Jup, that worked for me as well.

For solve this i do it:

  1. Make a Swap File
  2. Remove First Try Installation: rm -rf ~/.local/share/letsencrypt
  3. Install with this command: ./letsencrypt-auto -v -h

and LetsEncrypt is installed Ok.-