Letsencrypt Certbot 错误

Letsencrypt Certbot error

我正在尝试按照本指南在 Digital Ocean droplet 运行ning Ubuntu 12.04 上生成证书:https://certbot.eff.org/#ubuntuother-other

我看到以下错误:

./certbot-auto certonly

...

Creating virtual environment... 
Installing Python packages...

...

copying src/cryptography/hazmat/backends/commoncrypto/hmac.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/backends/commoncrypto
copying src/cryptography/hazmat/backends/commoncrypto/__init__.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/backends/commoncrypto
copying src/cryptography/hazmat/backends/commoncrypto/ciphers.py -> build/lib.linux-x86_64-2.7/cryptography/hazmat/backends/commoncrypto
running egg_info
writing requirements to src/cryptography.egg-info/requires.txt
writing src/cryptography.egg-info/PKG-INFO
writing top-level names to src/cryptography.egg-info/top_level.txt
writing dependency_links to src/cryptography.egg-info/dependency_links.txt
writing entry points to src/cryptography.egg-info/entry_points.txt
warning: manifest_maker: standard file '-c' not found

reading manifest file 'src/cryptography.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
no previously-included directories found matching 'docs/_build'
warning: no previously-included files matching '*' found under directory 'vectors'
writing manifest file 'src/cryptography.egg-info/SOURCES.txt'
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
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -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
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.6/README.Bugs> for instructions.
error: command 'gcc' failed with exit status 4

---------------------------------------- 
Command "/root/.local/share/letsencrypt/bin/python2.7 -u -c "import
setuptools,
tokenize;__file__='/tmp/pip-build-7RK5lP/cryptography/setup.py';exec(compile(getattr(tokenize,
'open', open)(__file__).read().replace(' ', ' '), __file__, 'exec'))"
install --record /tmp/pip-sdFAkd-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-7RK5lP/cryptography 
You are using pip version 8.0.3, however version 8.1.2 is available. 
You should consider upgrading via the 'pip install --upgrade pip' command.

我已经在其他 2 台类似的服务器上成功地 运行 此操作,没有任何问题。有什么想法吗?

编辑

找到相关的 Github 问题:https://github.com/certbot/certbot/issues/1081

似乎与内存有关,而不是 Python。试图停止 apache 服务以释放内存但看到同样的错误。

我成功 运行 certbot 的服务器有 2 GB 内存,这个只有 512 MB,这似乎是问题所在。 添加交换文件和 certbot 运行s 成功

--

Certbot 相关问题: https://github.com/certbot/certbot/issues/1081

python-cryptography apparently tries to compile a pretty big C binding, and gcc crashes due to lack of free memory.

使用本指南创建交换 space: https://www.digitalocean.com/community/tutorials/how-to-add-swap-on-ubuntu-14-04