command 'x86_64-linux-gnu-gcc' failed with exit status 1

今天再ubuntu16.04上安装fabric3时抛了异常

distutils.errors.DistutilsExecError: command 'x86_64-linux-gnu-gcc' failed with exit status 1

具体如下:

Complete output from command python setup.py egg_info:
    c/_cffi_backend.c:15:17: fatal error: ffi.h: No such file or directory
    compilation terminated.
    Traceback (most recent call last):
      File "/usr/lib/python3.5/distutils/unixccompiler.py", line 118, in _compile
        extra_postargs)
      File "/usr/lib/python3.5/distutils/ccompiler.py", line 909, in spawn
        spawn(cmd, dry_run=self.dry_run)
      File "/usr/lib/python3.5/distutils/spawn.py", line 36, in spawn
        _spawn_posix(cmd, search_path, dry_run=dry_run)
      File "/usr/lib/python3.5/distutils/spawn.py", line 159, in _spawn_posix
        % (cmd, exit_status))
    distutils.errors.DistutilsExecError: command 'x86_64-linux-gnu-gcc' failed with exit status 1

找了下,大概是因为cryptography模块对系统库的依赖有问题,可以执行以下命令更新

$ sudo apt-get update
$ sudo apt-get install libffi-dev g++ libssl-dev

 

你可能感兴趣的:(command 'x86_64-linux-gnu-gcc' failed with exit status 1)