Struggling to renew certificates on Raspberry Pi

I got the certificates installed no problem and renewed at least once already, but I’m approaching renewal again and the script is now throwing an error that I’m unable to track down.

Based on what I’ve read online, I’ve checked resources and it doesn’t appear to be a memory issue. I managed to get psutil installed cleanly even though it doesn’t appear to be officially supported on arm. I’ve run all of the updates and upgrades.

Running either of these commands:
letsencrypt-auto --apache
OR
certbot-auto --apache

Produces the following output:

Bootstrapping dependencies for Debian-based OSes...
Hit http://mirrordirector.raspbian.org jessie InRelease
Hit http://archive.raspberrypi.org jessie InRelease
Hit http://mirrordirector.raspbian.org jessie/main armhf Packages
Hit http://archive.raspberrypi.org jessie/main armhf Packages 
Hit http://mirrordirector.raspbian.org jessie/contrib armhf Packages
Hit http://archive.raspberrypi.org jessie/ui armhf Packages
Hit http://mirrordirector.raspbian.org jessie/non-free armhf Packages
Hit http://mirrordirector.raspbian.org jessie/rpi armhf Packages
Ign http://archive.raspberrypi.org jessie/main Translation-en_CA
Ign http://archive.raspberrypi.org jessie/main Translation-en 
Ign http://archive.raspberrypi.org jessie/ui Translation-en_CA
Ign http://archive.raspberrypi.org jessie/ui Translation-en
Ign http://mirrordirector.raspbian.org jessie/contrib Translation-en_CA
Ign http://mirrordirector.raspbian.org jessie/contrib Translation-en
Ign http://mirrordirector.raspbian.org jessie/main Translation-en_CA
Ign http://mirrordirector.raspbian.org jessie/main Translation-en
Ign http://mirrordirector.raspbian.org jessie/non-free Translation-en_CA
Ign http://mirrordirector.raspbian.org jessie/non-free Translation-en
Ign http://mirrordirector.raspbian.org jessie/rpi Translation-en_CA
Ign http://mirrordirector.raspbian.org jessie/rpi Translation-en
Reading package lists... Done
Reading package lists... Done
Building dependency tree       
Reading state information... Done
augeas-lenses is already the newest version.
ca-certificates is already the newest version.
dialog is already the newest version.
gcc is already the newest version.
libaugeas0 is already the newest version.
libffi-dev is already the newest version.
libssl-dev is already the newest version.
python is already the newest version.
python-dev is already the newest version.
python-virtualenv is already the newest version.
virtualenv is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
Creating virtual environment...
Installing Python packages...
Had a problem while installing Python packages:
Collecting argparse==1.4.0 (from -r /tmp/tmp.yKYbN1VnFD/letsencrypt-auto-requirements.txt (line 5))
  Downloading argparse-1.4.0-py2.py3-none-any.whl
Collecting pycparser==2.14 (from -r /tmp/tmp.yKYbN1VnFD/letsencrypt-auto-requirements.txt (line 11))
  Downloading pycparser-2.14.tar.gz (223kB)
Collecting cffi==1.4.2 (from -r /tmp/tmp.yKYbN1VnFD/letsencrypt-auto-requirements.txt (line 14))
  Downloading cffi-1.4.2.tar.gz (365kB)
Collecting ConfigArgParse==0.10.0 (from -r /tmp/tmp.yKYbN1VnFD/letsencrypt-auto-requirements.txt (line 31))
  Downloading ConfigArgParse-0.10.0.tar.gz
Collecting configobj==5.0.6 (from -r /tmp/tmp.yKYbN1VnFD/letsencrypt-auto-requirements.txt (line 33))
  Downloading configobj-5.0.6.tar.gz
Collecting cryptography==1.2.3 (from -r /tmp/tmp.yKYbN1VnFD/letsencrypt-auto-requirements.txt (line 35))
Downloading cryptography-1.2.3.tar.gz (373kB)
Collecting enum34==1.1.2 (from -r /tmp/tmp.yKYbN1VnFD/letsencrypt-auto-requirements.txt (line 57))
  Downloading enum34-1.1.2.tar.gz (46kB)
Collecting funcsigs==0.4 (from -r /tmp/tmp.yKYbN1VnFD/letsencrypt-auto-requirements.txt (line 60))
  Downloading funcsigs-0.4-py2.py3-none-any.whl
Collecting idna==2.0 (from -r /tmp/tmp.yKYbN1VnFD/letsencrypt-auto-requirements.txt (line 63))
  Downloading idna-2.0-py2.py3-none-any.whl (61kB)
Collecting ipaddress==1.0.16 (from -r /tmp/tmp.yKYbN1VnFD/letsencrypt-auto-requirements.txt (line 66))
  Downloading ipaddress-1.0.16-py27-none-any.whl
Collecting linecache2==1.0.0 (from -r /tmp/tmp.yKYbN1VnFD/letsencrypt-auto-requirements.txt (line 69))
  Downloading linecache2-1.0.0-py2.py3-none-any.whl
Collecting ndg-httpsclient==0.4.0 (from -r /tmp/tmp.yKYbN1VnFD/letsencrypt-auto-requirements.txt (line 72))
  Downloading ndg_httpsclient-0.4.0.tar.gz
Collecting ordereddict==1.1 (from -r /tmp/tmp.yKYbN1VnFD/letsencrypt-auto-requirements.txt (line 74))
  Downloading ordereddict-1.1.tar.gz
Collecting parsedatetime==2.1 (from -r /tmp/tmp.yKYbN1VnFD/letsencrypt-auto-requirements.txt (line 76))
  Downloading parsedatetime-2.1-py2-none-any.whl
Collecting pbr==1.8.1 (from -r /tmp/tmp.yKYbN1VnFD/letsencrypt-auto-requirements.txt (line 79))
  Downloading pbr-1.8.1-py2.py3-none-any.whl (89kB)
Collecting psutil==3.3.0 (from -r /tmp/tmp.yKYbN1VnFD/letsencrypt-auto-requirements.txt (line 82))
  Downloading psutil-3.3.0.tar.gz (261kB)
Collecting pyasn1==0.1.9 (from -r /tmp/tmp.yKYbN1VnFD/letsencrypt-auto-requirements.txt (line 104))
  Downloading pyasn1-0.1.9-py2.py3-none-any.whl
Collecting pyOpenSSL==0.15.1 (from -r /tmp/tmp.yKYbN1VnFD/letsencrypt-auto-requirements.txt (line 116))
  Downloading pyOpenSSL-0.15.1-py2.py3-none-any.whl (102kB)
Collecting pyRFC3339==1.0 (from -r /tmp/tmp.yKYbN1VnFD/letsencrypt-auto-requirements.txt (line 119))
  Downloading pyRFC3339-1.0-py2.py3-none-any.whl
Collecting python-augeas==0.5.0 (from -r /tmp/tmp.yKYbN1VnFD/letsencrypt-auto-requirements.txt (line 122))
  Downloading python-augeas-0.5.0.tar.gz (90kB)
Collecting python2-pythondialog==3.3.0 (from -r /tmp/tmp.yKYbN1VnFD/letsencrypt-auto-requirements.txt (line 124))
  Downloading python2-pythondialog-3.3.0.tar.bz2 (1.8MB)
Collecting pytz==2015.7 (from -r /tmp/tmp.yKYbN1VnFD/letsencrypt-auto-requirements.txt (line 127))
  Downloading pytz-2015.7-py2.py3-none-any.whl (476kB)
Collecting requests==2.9.1 (from -r /tmp/tmp.yKYbN1VnFD/letsencrypt-auto-requirements.txt (line 141))
  Downloading requests-2.9.1-py2.py3-none-any.whl (501kB)
Collecting six==1.10.0 (from -r /tmp/tmp.yKYbN1VnFD/letsencrypt-auto-requirements.txt (line 144))
  Downloading six-1.10.0-py2.py3-none-any.whl
Collecting traceback2==1.4.0 (from -r /tmp/tmp.yKYbN1VnFD/letsencrypt-auto-requirements.txt (line 147))
  Downloading traceback2-1.4.0-py2.py3-none-any.whl
Collecting unittest2==1.1.0 (from -r /tmp/tmp.yKYbN1VnFD/letsencrypt-auto-requirements.txt (line 150))
  Downloading unittest2-1.1.0-py2.py3-none-any.whl (96kB)
Collecting zope.component==4.2.2 (from -r /tmp/tmp.yKYbN1VnFD/letsencrypt-auto-requirements.txt (line 153))
  Downloading zope.component-4.2.2.tar.gz (546kB)
Collecting zope.event==4.1.0 (from -r /tmp/tmp.yKYbN1VnFD/letsencrypt-auto-requirements.txt (line 155))
  Downloading zope.event-4.1.0.tar.gz (476kB)
Collecting zope.interface==4.1.3 (from -r /tmp/tmp.yKYbN1VnFD/letsencrypt-auto-requirements.txt (line 157))
  Downloading zope.interface-4.1.3.tar.gz (141kB)
Collecting mock==1.0.1 (from -r /tmp/tmp.yKYbN1VnFD/letsencrypt-auto-requirements.txt (line 175))
  Downloading mock-1.0.1.zip (861kB)
Collecting letsencrypt==0.7.0 (from -r /tmp/tmp.yKYbN1VnFD/letsencrypt-auto-requirements.txt (line 178))
  Downloading letsencrypt-0.7.0-py2-none-any.whl
Collecting acme==0.8.1 (from -r /tmp/tmp.yKYbN1VnFD/letsencrypt-auto-requirements.txt (line 184))
  Downloading acme-0.8.1-py2.py3-none-any.whl (91kB)
Collecting certbot==0.8.1 (from -r /tmp/tmp.yKYbN1VnFD/letsencrypt-auto-requirements.txt (line 187))
  Downloading certbot-0.8.1-py2-none-any.whl (217kB)
Collecting certbot-apache==0.8.1 (from -r /tmp/tmp.yKYbN1VnFD/letsencrypt-auto-requirements.txt (line 190))
  Downloading certbot_apache-0.8.1-py2-none-any.whl (103kB)
Requirement already satisfied (use --upgrade to upgrade): setuptools>=1.0 in ./.local/share/letsencrypt/lib/python2.7/site-packages (from cryptography==1.2.3->-r /tmp/tmp.yKYbN1VnFD/letsencrypt-auto-requirements.txt (line 35))
Installing collected packages: argparse, pycparser, cffi, ConfigArgParse, six, configobj, idna, pyasn1, enum34, ipaddress, cryptography, funcsigs, linecache2, pyOpenSSL, ndg-httpsclient, ordereddict, parsedatetime, pbr, psutil, pytz, pyRFC3339, python-augeas, python2-pythondialog, requests, traceback2, unittest2, zope.interface, zope.event, zope.component, mock, acme, certbot, letsencrypt, certbot-apache
  Found existing installation: argparse 1.2.1
    Not uninstalling argparse at /usr/lib/python2.7, outside environment /home/chris/.local/share/letsencrypt
  Running setup.py install for pycparser: started
    Running setup.py install for pycparser: finished with status 'done'
  Running setup.py install for cffi: started
    Running setup.py install for cffi: still running...
    Running setup.py install for cffi: finished with status 'done'
  Running setup.py install for ConfigArgParse: started
    Running setup.py install for ConfigArgParse: finished with status 'done'
  Running setup.py install for configobj: started
    Running setup.py install for configobj: finished with status 'done'
  Running setup.py install for enum34: started
    Running setup.py install for enum34: finished with status 'done'
  Running setup.py install for cryptography: started
    Running setup.py install for cryptography: still running...
    Running setup.py install for cryptography: finished with status 'done'
  Running setup.py install for ndg-httpsclient: started
    Running setup.py install for ndg-httpsclient: finished with status 'done'
  Running setup.py install for ordereddict: started
    Running setup.py install for ordereddict: finished with status 'done'
  Running setup.py install for psutil: started
    Running setup.py install for psutil: finished with status 'error'
    Complete output from command /home/chris/.local/share/letsencrypt/bin/python2.7 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-_pDSrR/psutil/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('
', '
'), __file__, 'exec'))" install --record /tmp/pip-Ql6GK1-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/chris/.local/share/letsencrypt/include/site/python2.7/psutil:
running install
running build
running build_py
creating build
creating build/lib.linux-armv7l-2.7
creating build/lib.linux-armv7l-2.7/psutil
copying psutil/_psposix.py -> build/lib.linux-armv7l-2.7/psutil
copying psutil/_psosx.py -> build/lib.linux-armv7l-2.7/psutil
copying psutil/_pssunos.py -> build/lib.linux-armv7l-2.7/psutil
copying psutil/_common.py -> build/lib.linux-armv7l-2.7/psutil
copying psutil/_pslinux.py -> build/lib.linux-armv7l-2.7/psutil
copying psutil/_compat.py -> build/lib.linux-armv7l-2.7/psutil
copying psutil/_psbsd.py -> build/lib.linux-armv7l-2.7/psutil
copying psutil/_pswindows.py -> build/lib.linux-armv7l-2.7/psutil
copying psutil/__init__.py -> build/lib.linux-armv7l-2.7/psutil
running build_ext
building 'psutil._psutil_linux' extension
creating build/temp.linux-armv7l-2.7
creating build/temp.linux-armv7l-2.7/psutil
arm-linux-gnueabihf-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 -DPSUTIL_VERSION=330 -I/usr/include/python2.7 -c psutil/_psutil_linux.c -o build/temp.linux-armv7l-2.7/psutil/_psutil_linux.o
In file included from /usr/include/asm-generic/ioctls.h:4:0,
                 from /usr/include/arm-linux-gnueabihf/asm/ioctls.h:6,
                 from /usr/include/arm-linux-gnueabihf/bits/ioctls.h:23,
                 from /usr/include/arm-linux-gnueabihf/sys/ioctl.h:26,
                 from psutil/_psutil_linux.c:22:
/usr/include/linux/ioctl.h:2:2: error: invalid preprocessing directive #defyne
 #defyne _LINUX_IO?TN_H
  ^
In file included from /usr/include/asm-generic/ioctls.h:4:0,
                 from /usr/include/arm-linux-gnueabihf/asm/ioctls.h:6,
                 from /usr/include/arm-linux-gnueabihf/bits/ioctls.h:23,
                 from /usr/include/arm-linux-gnueabihf/sys/ioctl.h:26,
                 from psutil/_psutil_linux.c:22:
/usr/include/linux/ioctl.h:6:2: error: invalid preprocessing directive #mndif
 #mndif /+ _LINUX_IOCTL_H */
  ^
In file included from /usr/include/asm-generic/ioctls.h:4:0,
                 from /usr/include/arm-linux-gnueabihf/asm/ioctls.h:6,
                 from /usr/include/arm-linux-gnueabihf/bits/ioctls.h:23,
                 from /usr/include/arm-linux-gnueabihf/sys/ioctl.h:26,
                 from psutil/_psutil_linux.c:22:
/usr/include/linux/ioctl.h:1:0: error: unterminated #ifndef
 #ifndef _LINUX_IOCTH_H
 ^
error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1

----------------------------------------
Command "/home/chris/.local/share/letsencrypt/bin/python2.7 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-_pDSrR/psutil/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('
', '
'), __file__, 'exec'))" install --record /tmp/pip-Ql6GK1-record/install-record.txt --single-version-externally-managed --compile --install-headers     /home/chris/.local/share/letsencrypt/include/site/python2.7/psutil" failed with error code 1 in     /tmp/pip-build-_pDSrR/psutil
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.

My operating system is (include version):
4.4.13-v7+ armv7l GNU/Linux

My web server is (include version):
Apache /2.4.10 (Raspbian)

Any assistance you can provide to help get this working again would be appreciated.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.