今天在树莓派上编译安装VIM的时候,编译过程sudo make中出现过错误:
gcc -c -I. -Iproto -DHAVE_CONFIG_H -g -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -I/usr/include/python2.7 -DPYTHON_HOME='"/usr"' -pthread -DDYNAMIC_PYTHON_DLL=\"\" -o objects/if_python.o if_python.c
if_python.c:67:20: fatal error: Python.h: 没有那个文件或目录
#include <Python.h>
^
compilation terminated.
Makefile:2875: recipe for target 'objects/if_python.o' failed
make: *** [objects/if_python.o] Error 1
解决方法是解决方法是安装Python-dev,这是Python的头文件和静态库包:
sudo apt-get install python-dev