2015-06-20 382 views
1
i686-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv 
-O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c src/re2.cpp -o build/temp.linux-i686-2.7/src/re2.o 
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ [enabled by default] 
src/re2.cpp:201:29: fatal error: re2/stringpiece.h: No such file or directory 
#include "re2/stringpiece.h" 
          ^
compilation terminated. 
error: command 'i686-linux-gnu-gcc' failed with exit status 1 

我以前做過sudo apt-get install python-dev安裝在Python RE2模塊的失敗

+1

嘗試安裝了Python包,然後再安裝'libre2,dev' * RE2 *。另外請注意,這不是特別與編程有關。 – dhke

+0

謝謝。當我嘗試作爲代碼時,它不允許我說我需要給出更多解釋,實際上這是多餘的。 –

回答

1

愚蠢的我。我需要首先安裝Google re2 https://github.com/google/re2

請按照README那裏進行製作和安裝。這會將re2頭文件安裝到Ubuntu上的/ usr/local/include/re2中。

然後安裝的re2 python包裝工程。

1

爲Fedora 23,你的終端

dnf install re2 re2-devel 
2

上剛剛火起來這個命令在Ubuntu它下面的命令:

apt-get install libre2-dev