在弄個dota2的replay parser玩玩,在github上找到了幾個,都是基於V社的demoinfo2(https://developer.valvesoftware.com/wiki/Dota_2_Demo_Format)。
但在裝其中一個需要的包python-snappy時,出現了以下的報錯:
$ sudo python setup.py build running build running build_ext building 'snappy' extension gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c snappymodule.cc -o build/temp.linux-x86_64-2.7/snappymodule.o cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for Ada/C/ObjC but not for C++ [enabled by default] snappymodule.cc:31:22: fatal error: snappy-c.h: No such file or directory compilation terminated. error: command 'gcc' failed with exit status 1
google之,在stackoverflow上找到了同樣的問題:http://stackoverflow.com/questions/11416024/error-installing-python-snappy。
根據其解決方案,先安裝snappy C library:http://code.google.com/p/snappy/downloads/list。
問題解決。