close

in centos
try
yum install python-devel

root@reservice[/tmp/pymmseg-cpp]{11:20}# python setup.py build
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.6
creating build/lib.linux-x86_64-2.6/mmseg
copying mmseg/__init__.py -> build/lib.linux-x86_64-2.6/mmseg
creating build/lib.linux-x86_64-2.6/mmseg/data
copying mmseg/data/chars.dic -> build/lib.linux-x86_64-2.6/mmseg/data
copying mmseg/data/words.dic -> build/lib.linux-x86_64-2.6/mmseg/data
running build_ext
building 'mmseg._mmseg' extension
creating build/temp.linux-x86_64-2.6
creating build/temp.linux-x86_64-2.6/mmseg
creating build/temp.linux-x86_64-2.6/mmseg/mmseg-cpp
gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -Immseg/mmseg-cpp -I/usr/include/python2.6 -c mmseg/mmseg-cpp/mmseg.cpp -o build/temp.linux-x86_64-2.6/mmseg/mmseg-cpp/mmseg.o
mmseg/mmseg-cpp/mmseg.cpp:7:20: 錯誤:Python.h:沒有此一檔案或目錄
mmseg/mmseg-cpp/mmseg.cpp:8:26: 錯誤:structmember.h:沒有此一檔案或目錄
mmseg/mmseg-cpp/mmseg.cpp:9:27: 錯誤:unicodeobject.h:沒有此一檔案或目錄
In file included from mmseg/mmseg-cpp/mmseg.cpp:11:
mmseg/mmseg-cpp/utils.h: In function 「char* PyMem_Strndup(const char*, size_t)」:
mmseg/mmseg-cpp/utils.h:9: 錯誤:expected primary-expression before 「char」
mmseg/mmseg-cpp/utils.h:9: 錯誤:「PyMem_New」 在此作用欄位中尚未宣告
mmseg/mmseg-cpp/utils.h: In function 「char* reprn(char*, size_t)」:
mmseg/mmseg-cpp/utils.h:65: 錯誤:「sprintf」 在此作用欄位中尚未宣告
mmseg/mmseg-cpp/utils.h:69: 錯誤:「sprintf」 在此作用欄位中尚未宣告
mmseg/mmseg-cpp/utils.h:73: 錯誤:「sprintf」 在此作用欄位中尚未宣告
mmseg/mmseg-cpp/utils.h:77: 錯誤:「sprintf」 在此作用欄位中尚未宣告
mmseg/mmseg-cpp/utils.h:81: 錯誤:「sprintf」 在此作用欄位中尚未宣告
mmseg/mmseg-cpp/mmseg.cpp: At global scope:
mmseg/mmseg-cpp/mmseg.cpp:20: 錯誤:ISO C++ 不允許宣告無類型的 「PyObject_HEAD」
mmseg/mmseg-cpp/mmseg.cpp:21: 錯誤:expected 「;」 before 「}」 token
mmseg/mmseg-cpp/mmseg.cpp:21: 錯誤:expected 「;」 before 「}」 token
mmseg/mmseg-cpp/mmseg.cpp:23: 錯誤:expected initializer before 「*」 token


arrow
arrow
    文章標籤
    linux
    全站熱搜

    peicheng 發表在 痞客邦 留言(0) 人氣()