狐の社

覚書とかとか

Python.h: No such file or directory

わりとメインになりつつあるLinux Mint機にpythonのpcapyを入れようとしたら

cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ [enabled by default] pcapdumper.cc:10:20: fatal error: Python.h: そのようなファイルやディレクトリはありません #include <Python.h> ^ compilation terminated. error: Setup script exited with error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

と怒られたので、いろいろ探してみたら

python-devを入れればいいことがわかったので、とりあえず

sudo aptitude install python-dev

をしてみた

そしたら無事成功したもよう

Processing dependencies for pcapy Finished processing dependencies for pcapy

( v'ω')vイエーイ

※参考サイト

unix.stackexchange.com