Install failed on a raspberry pi3

I tried to install mailinabox on a raspi3, with proper DNS config.

Everything went well until the daemon’s installation. It wrote this :

Installing Z-Push (Exchange/ActiveSync server)…
Installing Mail-in-a-Box system management daemon…

FAILED: /usr/local/lib/mailinabox/env/bin/pip install --upgrade rtyaml email_validator>=1.0.0 exclusiveprocess flask dnspython python-dateutil idna>=2.0.0 cryptography==2.2.2 boto psutil postfix-mta-sts-resolver

Collecting rtyaml
Downloading rtyaml-1.0.0-py2.py3-none-any.whl (10 kB)
Collecting email_validator>=1.0.0
Using cached email_validator-1.1.1-py2.py3-none-any.whl (17 kB)
Collecting exclusiveprocess
Downloading exclusiveprocess-0.9.4.tar.gz (9.0 kB)
Collecting flask
Downloading Flask-1.1.2-py2.py3-none-any.whl (94 kB)
Collecting dnspython
Using cached dnspython-2.0.0-py3-none-any.whl (208 kB)
Collecting python-dateutil
Downloading python_dateutil-2.8.1-py2.py3-none-any.whl (227 kB)
Collecting idna>=2.0.0
Downloading idna-2.10-py2.py3-none-any.whl (58 kB)
Collecting cryptography==2.2.2
Downloading cryptography-2.2.2.tar.gz (443 kB)
Collecting boto
Using cached boto-2.49.0-py2.py3-none-any.whl (1.4 MB)
Collecting psutil
Downloading psutil-5.7.2.tar.gz (460 kB)
Collecting postfix-mta-sts-resolver
Downloading postfix_mta_sts_resolver-1.0.0-py3-none-any.whl (26 kB)
Collecting pyyaml
Downloading PyYAML-5.3.1.tar.gz (269 kB)
Collecting click>=5.1
Downloading click-7.1.2-py2.py3-none-any.whl (82 kB)
Collecting Jinja2>=2.10.1
Downloading Jinja2-2.11.2-py2.py3-none-any.whl (125 kB)
Collecting Werkzeug>=0.15
Downloading Werkzeug-1.0.1-py2.py3-none-any.whl (298 kB)
Collecting itsdangerous>=0.24
Downloading itsdangerous-1.1.0-py2.py3-none-any.whl (16 kB)
Collecting six>=1.5
Downloading six-1.15.0-py2.py3-none-any.whl (10 kB)
Collecting asn1crypto>=0.21.0
Downloading asn1crypto-1.4.0-py2.py3-none-any.whl (104 kB)
Collecting cffi>=1.7
Downloading cffi-1.14.2.tar.gz (470 kB)
Collecting aiodns>=1.1.1
Downloading aiodns-2.0.0-py2.py3-none-any.whl (4.8 kB)
Collecting aiohttp>=3.4.4
Downloading aiohttp-3.6.2-py3-none-any.whl (441 kB)
Collecting MarkupSafe>=0.23
Downloading MarkupSafe-1.1.1.tar.gz (19 kB)
Collecting pycparser
Downloading pycparser-2.20-py2.py3-none-any.whl (112 kB)
Collecting pycares>=3.0.0
Downloading pycares-3.1.1.tar.gz (233 kB)
ERROR: Command errored out with exit status 1:
command: /usr/local/lib/mailinabox/env/bin/python3 -c ‘import sys, setuptools, tokenize; sys.argv[0] = ‘"’"’/tmp/pip-install-3mov01vs/pycares/setup.py’"’"’; file=’"’"’/tmp/pip-install-3mov01vs/pycares/setup.py’"’"’;f=getattr(tokenize, ‘"’"‘open’"’"’, open)(file);code=f.read().replace(’"’"’\r\n’"’"’, ‘"’"’\n’"’"’);f.close();exec(compile(code, file, ‘"’"‘exec’"’"’))’ egg_info --egg-base /tmp/pip-pip-egg-info-938nil5y
cwd: /tmp/pip-install-3mov01vs/pycares/
Complete output (73 lines):
ERROR: Command errored out with exit status 1:
command: /usr/local/lib/mailinabox/env/bin/python3 -u -c ‘import sys, setuptools, tokenize; sys.argv[0] = ‘"’"’/tmp/pip-wheel-maepz59c/cffi/setup.py’"’"’; file=’"’"’/tmp/pip-wheel-maepz59c/cffi/setup.py’"’"’;f=getattr(tokenize, ‘"’"‘open’"’"’, open)(file);code=f.read().replace(’"’"’\r\n’"’"’, ‘"’"’\n’"’"’);f.close();exec(compile(code, file, ‘"’"‘exec’"’"’))’ bdist_wheel -d /tmp/pip-wheel-4xhpotx0
cwd: /tmp/pip-wheel-maepz59c/cffi/
Complete output (36 lines):
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-aarch64-3.6
creating build/lib.linux-aarch64-3.6/cffi
copying cffi/verifier.py -> build/lib.linux-aarch64-3.6/cffi
copying cffi/pkgconfig.py -> build/lib.linux-aarch64-3.6/cffi
copying cffi/vengine_gen.py -> build/lib.linux-aarch64-3.6/cffi
copying cffi/vengine_cpy.py -> build/lib.linux-aarch64-3.6/cffi
copying cffi/setuptools_ext.py -> build/lib.linux-aarch64-3.6/cffi
copying cffi/api.py -> build/lib.linux-aarch64-3.6/cffi
copying cffi/error.py -> build/lib.linux-aarch64-3.6/cffi
copying cffi/model.py -> build/lib.linux-aarch64-3.6/cffi
copying cffi/ffiplatform.py -> build/lib.linux-aarch64-3.6/cffi
copying cffi/lock.py -> build/lib.linux-aarch64-3.6/cffi
copying cffi/cffi_opcode.py -> build/lib.linux-aarch64-3.6/cffi
copying cffi/init.py -> build/lib.linux-aarch64-3.6/cffi
copying cffi/cparser.py -> build/lib.linux-aarch64-3.6/cffi
copying cffi/commontypes.py -> build/lib.linux-aarch64-3.6/cffi
copying cffi/recompiler.py -> build/lib.linux-aarch64-3.6/cffi
copying cffi/backend_ctypes.py -> build/lib.linux-aarch64-3.6/cffi
copying cffi/_cffi_include.h -> build/lib.linux-aarch64-3.6/cffi
copying cffi/parse_c_type.h -> build/lib.linux-aarch64-3.6/cffi
copying cffi/_embedding.h -> build/lib.linux-aarch64-3.6/cffi
copying cffi/_cffi_errors.h -> build/lib.linux-aarch64-3.6/cffi
running build_ext
building ‘_cffi_backend’ extension
creating build/temp.linux-aarch64-3.6
creating build/temp.linux-aarch64-3.6/c
aarch64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -flto -fuse-linker-plugin -ffat-lto-objects -fPIC -DUSE__THREAD -DHAVE_SYNC_SYNCHRONIZE -I/usr/include/ffi -I/usr/include/libffi -I/usr/local/lib/mailinabox/env/include/python3.6m -c c/_cffi_backend.c -o build/temp.linux-aarch64-3.6/c/_cffi_backend.o
c/_cffi_backend.c:15:10: fatal error: ffi.h: No such file or directory
#include <ffi.h>
^~~~~~~
compilation terminated.
error: command ‘/usr/bin/aarch64-linux-gnu-gcc’ failed with exit code 1
----------------------------------------
ERROR: Failed building wheel for cffi
ERROR: Failed to build one or more wheels
Traceback (most recent call last):
File “/usr/local/lib/mailinabox/env/lib/python3.6/site-packages/setuptools/installer.py”, line 126, in fetch_build_egg
subprocess.check_call(cmd)
File “/usr/lib/python3.6/subprocess.py”, line 311, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command ‘[’/usr/local/lib/mailinabox/env/bin/python3’, ‘-m’, ‘pip’, ‘–disable-pip-version-check’, ‘wheel’, ‘–no-deps’, ‘-w’, ‘/tmp/tmp5mb1zv3q’, ‘–quiet’, ‘cffi>=1.5.0’]’ returned non-zero exit status 1.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/tmp/pip-install-3mov01vs/pycares/setup.py", line 47, in <module>
    zip_safe         = False
  File "/usr/local/lib/mailinabox/env/lib/python3.6/site-packages/setuptools/__init__.py", line 152, in setup
    _install_setup_requires(attrs)
  File "/usr/local/lib/mailinabox/env/lib/python3.6/site-packages/setuptools/__init__.py", line 147, in _install_setup_requires
    dist.fetch_build_eggs(dist.setup_requires)
  File "/usr/local/lib/mailinabox/env/lib/python3.6/site-packages/setuptools/dist.py", line 676, in fetch_build_eggs
    replace_conflicting=True,
  File "/usr/local/lib/mailinabox/env/lib/python3.6/site-packages/pkg_resources/__init__.py", line 774, in resolve
    replace_conflicting=replace_conflicting
  File "/usr/local/lib/mailinabox/env/lib/python3.6/site-packages/pkg_resources/__init__.py", line 1057, in best_match
    return self.obtain(req, installer)
  File "/usr/local/lib/mailinabox/env/lib/python3.6/site-packages/pkg_resources/__init__.py", line 1069, in obtain
    return installer(requirement)
  File "/usr/local/lib/mailinabox/env/lib/python3.6/site-packages/setuptools/dist.py", line 732, in fetch_build_egg
    return fetch_build_egg(self, req)
  File "/usr/local/lib/mailinabox/env/lib/python3.6/site-packages/setuptools/installer.py", line 128, in fetch_build_egg
    raise DistutilsError(str(e)) from e
distutils.errors.DistutilsError: Command '['/usr/local/lib/mailinabox/env/bin/python3', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/tmp/tmp5mb1zv3q', '--quiet', 'cffi>=1.5.0']' returned non-zero exit status 1.
----------------------------------------

ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

Same for me,with install libffi.dev : ok

I do not do anything with Raspberry pi’s but I did take a look around and to me it seems that the version of Ubuntu released for Raspi’s is different than the server edition which is used for this project. It makes sense that it will not work.

Search for the thread…

Raspberry Pi Setup from April 24

Have a look at my notes on an older thread https://discourse.mailinabox.email/t/raspberry-pi-setup/6395
Not all required libraries are installed, you will need to: sudo apt install libffi-dev

Also, after running on a Pi for a while, I changed to a more stable platform. See https://discourse.mailinabox.email/t/running-from-home/6459/12?u=andrew

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