Python Cryptography Error Message


Hey Everybody!

I’m running Ubuntu 14.04 and have created ~30 or so certs with no problem. I needed to add a new cert today and when I ran

./letsencrypt-auto --apache -d

I received this error:

Command "/root/.local/share/letsencrypt/bin/python2.7 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-hc6bGI/cry ptography/';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-pUZYFr-record/install-record.txt -- single-version-externally-managed --compile --install-headers /root/.local/share/letsencrypt/include/site/python2.7/cryptography" failed with error code 1 in /tmp/pip-build-hc6bGI/cryptography

I found this post that I thought would address the issue. The solution they gave was to run this command:

sudo apt-get install build-essential libssl-dev libffi-dev python-dev

but when I did, nothing was updated or installed.

0 upgraded, 0 newly installed, 0 to remove and 209 not upgraded.

Does anyone have any ideas as to what is going wrong and how to fix it? Thanks!


Hoping to anticipate some questions:

Post Link - I am running on AWS EC2, but I have enough memory and my Python Version is 2.7.6

Post Link - I ran

./letsencrypt-auto -v -h

with no success. I can post the output if needed.


I restarted the server and everything worked fine. Don’t know what was going wrong, but in the immortal words of Chris O’Dowd, “have you tried turning it off and on again?”


I too was running into the same error when trying to set up a renewal. However, under close inspection, the output of the ./letsencrypt-auto -v -h (with the rest of my normal command line), showed that I was running out of memory.

I’m running on a DigitalOcean droplet with 1G of RAM and 30G of SSD. I was able to add 500M of swap space and this completely solved the problem. Found a good article on how to do this at:

I had done this before when I first set up certs, but had forgotten this and had rebooted the droplet at some point. The article includes steps on how to make this permanent.