AIO Install Error

Hey,

Hoping someone could help me out. I have received this error three times while trying to re-build HA. I formatted the SD card and put the latest build of Raspbian (stretch) on it. I’m out of ideas, hence asking all of you. Any help would be appreciated. Thanks!

Collecting pynacl>=1.0.1 (from paramiko<3.0,>=1.10->fabric)
  Downloading PyNaCl-1.1.2.tar.gz (3.1MB)
    100% |████████████████████████████████| 3.1MB 84kB/s
    Complete output from command python setup.py egg_info:
    Package libffi was not found in the pkg-config search path.
    Perhaps you should add the directory containing `libffi.pc'
    to the PKG_CONFIG_PATH environment variable
    No package 'libffi' found
    Package libffi was not found in the pkg-config search path.
    Perhaps you should add the directory containing `libffi.pc'
    to the PKG_CONFIG_PATH environment variable
    No package 'libffi' found
    Package libffi was not found in the pkg-config search path.
    Perhaps you should add the directory containing `libffi.pc'
    to the PKG_CONFIG_PATH environment variable
    No package 'libffi' found
    Package libffi was not found in the pkg-config search path.
    Perhaps you should add the directory containing `libffi.pc'
    to the PKG_CONFIG_PATH environment variable
    No package 'libffi' found
    Package libffi was not found in the pkg-config search path.
    Perhaps you should add the directory containing `libffi.pc'
    to the PKG_CONFIG_PATH environment variable
    No package 'libffi' found
    c/_cffi_backend.c:15:17: fatal error: ffi.h: No such file or directory
     #include <ffi.h>
                     ^
    compilation terminated.
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-JQUhcS/pynacl/setup.py", line 232, in <module>
        "Programming Language :: Python :: 3.6",
      File "/usr/lib/python2.7/distutils/core.py", line 111, in setup
        _setup_distribution = dist = klass(attrs)
      File "/usr/local/lib/python2.7/dist-packages/setuptools/dist.py", line 335                                          , in __init__
        self.fetch_build_eggs(attrs['setup_requires'])
      File "/usr/local/lib/python2.7/dist-packages/setuptools/dist.py", line 456                                          , in fetch_build_eggs
        replace_conflicting=True,
      File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", l                                          ine 863, in resolve
        replace_conflicting=replace_conflicting
      File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", l                                          ine 1141, in best_match
        return self.obtain(req, installer)
      File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", l                                          ine 1153, in obtain
        return installer(requirement)
      File "/usr/local/lib/python2.7/dist-packages/setuptools/dist.py", line 522                                          , in fetch_build_egg
        return cmd.easy_install(req)
      File "/usr/local/lib/python2.7/dist-packages/setuptools/command/easy_insta                                          ll.py", line 672, in easy_install
        return self.install_item(spec, dist.location, tmpdir, deps)
      File "/usr/local/lib/python2.7/dist-packages/setuptools/command/easy_insta                                          ll.py", line 698, in install_item
        dists = self.install_eggs(spec, download, tmpdir)
      File "/usr/local/lib/python2.7/dist-packages/setuptools/command/easy_insta                                          ll.py", line 879, in install_eggs
        return self.build_and_install(setup_script, setup_base)
      File "/usr/local/lib/python2.7/dist-packages/setuptools/command/easy_insta                                          ll.py", line 1118, in build_and_install
        self.run_setup(setup_script, setup_base, args)
      File "/usr/local/lib/python2.7/dist-packages/setuptools/command/easy_insta                                          ll.py", line 1106, in run_setup
        raise DistutilsError("Setup script exited with %s" % (v.args[0],))
    distutils.errors.DistutilsError: Setup script exited with error: command 'ar                                          m-linux-gnueabihf-gcc' failed with exit status 1

    ----------------------------------------
**Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-JQ                                          UhcS/pynacl/**
Cloning into 'fabric-home-assistant'...
remote: Counting objects: 317, done.
remote: Total 317 (delta 0), reused 0 (delta 0), pack-reused 317
Receiving objects: 100% (317/317), 133.51 KiB | 0 bytes/s, done.
Resolving deltas: 100% (183/183), done.
hass_rpi_installer.sh: line 139: fab: command not found
[email protected]:~ $ ^C
[email protected]:~ $ "python setup.py egg_info" failed with error code 1

May have figured it out…apparently you have to take the z-stick out before running the install. I’ll update once this is finished.

This would suggest you need to install the libffi package

sudo apt-get install libffi-dev

Thanks, removing the z-stick did the trick. At least I know for next time. Thanks everyone