pip安装出现error: command 'gcc' failed with exit status 1

使用pip安装cffi模块的时候出现错误:
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DUSE__THREAD -I/usr/include/ffi -I/usr/include/libffi -I/usr/local/include/python2.7 -c c/_cffi_backend.c -o build/temp.linux-x86_64-2.7/c/_cffi_backend.o
c/_cffi_backend.c:15:17: fatal error: ffi.h: No such file or directory
 #include 
                 ^
compilation terminated.
error: command 'gcc' failed with exit status 1
在网上搜了一下,大部分说安装Python-dev模块,但是安装之后还是报错,看到一个说安装libffi-dev试了一下,就可以了,记录一下…… 参考链接:https://github.com/bpython/bpython/issues/565