I'm working on raspberry pi (running raspbian stretch) and I would like to install the azure-cli tool.
I followed this tutorial: https://learn.microsoft.com/en-us/cli/azure/install-azure-cli-linux?view=azure-cli-latest which explains how to install the azure-cli manually.
I have the prerequisites (docker, libffi and openssl).
But when I run this command:
$ curl -L https://aka.ms/InstallAzureCli | bash
I have the following error:
c/_cffi_backend.c:15:17: fatal error: ffi.h: No such file or directory
#include <ffi.h>
^
compilation terminated.
error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1
----------------------------------------
Command "/home/pi/lib/azure-cli/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-AymY3d/cffi/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-GwBn9T/install-record.txt --single-version-externally-managed --prefix /tmp/pip-build-env-7GqUCB/overlay --compile --install-headers /home/pi/lib/azure-cli/include/site/python2.7/cffi" failed with error code 1 in /tmp/pip-install-AymY3d/cffi/
----------------------------------------
Command "/home/pi/lib/azure-cli/bin/python /home/pi/lib/azure-cli/local/lib/python2.7/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-7GqUCB/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple --extra-index-url https://www.piwheels.org/simple -- setuptools>=18.5 wheel "cffi>=1.8,!=1.11.3; python_implementation != 'PyPy'"" failed with error code 1 in None
Traceback (most recent call last):
File "/tmp/azure_cli_install_tmp_N09j1y", line 370, in <module>
main()
File "/tmp/azure_cli_install_tmp_N09j1y", line 356, in main
install_cli(install_dir, tmp_dir)
File "/tmp/azure_cli_install_tmp_N09j1y", line 140, in install_cli
exec_command(cmd)
File "/tmp/azure_cli_install_tmp_N09j1y", line 100, in exec_command
subprocess.check_call(command_list, cwd=cwd, env=env)
File "/usr/lib/python2.7/subprocess.py", line 186, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/home/pi/lib/azure-cli/bin/pip', 'install', '--cache-dir', '/tmp/tmpD9EVQQ', 'azure-cli', '--upgrade']' returned non-zero exit status 1
The first part of the error (with ffi.h) appears several times.
I need some help to solve this issue. Thanks
