编译 PostgreSQL
的插件 zhparser
时报错:
gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -O2 -fPIC -I/usr/local/include/scws -I. -I. -I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -c -o zhparser.o zhparser.c In file included from zhparser.c:8:0: zhparser.h:8:18: fatal error: scws.h: No such file or directory #include "scws.h" ^
其实在该目录下的 README.md
已经提供了解决办法,系统没有 wget
命令,改用 curl
:
curl -O http://www.xunsearch.com/scws/down/scws-1.2.3.tar.bz2 tar -xf scws-1.2.3.tar.bz2 cd scws-1.2.3 ./configure make make install