安装Sphinx -Arch Linux时出错

时间:2011-10-21 07:27:30

标签: sphinx

我似乎遇到与this guy:

相同的问题

我在Arch Linux上使用XAMPP,每个软件包都更新到最新版本。

$ make
Making all in src
make[1]: Entering directory «.../src»
/bin/sh svnxrev.sh ..
make all-am
make[2]: Entering directory «/home/sphinx/src»
g++ -DHAVE_CONFIG_H -I. -I../config -DSYSCONFDIR="\"/home/sphinx/sphinx_bin/etc\""
-DDATADIR="\"/home/sphinx/sphinx_bin/var/data\"" -I/usr/local/include -I/mysql/include
-I/mysq/include -L/mysql/lib -Wl,--rpath -Wl,/mysql/lib -fno-exceptions -g -Wall -g
-D_FILE_OFFSET_BITS=64 -O3 -DNDEBUG -MT sphinx.o -MD -MP -MF .deps/sphinx.Tpo -c -o
sphinx.o sphinx.cpp
sphinx.cpp: In constructor �?WordformContainer_t::WordformContainer_t()’:
sphinx.cpp:15614:27: warning: �?WordformContainer_t::m_pMultiWordforms’ will be
initialized after
sphinx.cpp:15611:15: warning: �?uint64_t WordformContainer_t::m_uTokenizerFNV’
sphinx.cpp:15904:1: warning: when initialized here
sphinx.cpp: In function �?int xmlUnknownEncoding(void*, const XML_Char*,
XML_Encoding*)’:
sphinx.cpp:21575:10: error: �?XML_STATUS_ERROR’ was not declared in this scope
sphinx.cpp:21599:9: error: �?XML_STATUS_OK’ was not declared in this scope
sphinx.cpp: In member function �?bool CSphSource_XMLPipe2::ParseNextChunk(int,
CSphString&)’:
sphinx.cpp:22112:76: error: �?XML_STATUS_OK’ was not declared in this scope
sphinx.cpp: In function �?int xmlUnknownEncoding(void*, const XML_Char*,
XML_Encoding*)’:
sphinx.cpp:21600:1: warning: control reaches end of non-void function
make[2]: *** [sphinx.o] Error 1
make[2]: leaving directory «/home/sphinx/src»
make[1]: *** [all] Error 2
make[1]: leaving directory «/home/sphinx/src»
make: *** [all-recursive] Error 1

3 个答案:

答案 0 :(得分:2)

AUR package中的评论可能有所帮助。编译前需要修改两个源文件。

[arch ~]# tar zxf sphinx-2.0.4-release.tar.gz
[arch ~]# cd sphinx-2.0.4-release
[arch sphinx-2.0.4-release]# sed -i 's/T val = ExprEval/T val = this->ExprEval/g' "src/sphinxexpr.cpp"
[arch sphinx-2.0.4-release]# sed -i '15083,15083 s/x00/x21/' "src/searchd.cpp"
[arch sphinx-2.0.4-release]# make
[arch sphinx-2.0.4-release]# make install

答案 1 :(得分:1)

emcconville的解决方案适用于使用过时sphinx-0.9.9的http://wordpress.org/plugins/wordpress-sphinx-plugin/插件安装。 sudo apt-get install libmysqlclient-dev 包也是Ubuntu的先决条件

答案 2 :(得分:0)

该问题是由安装了2个expat实例引起的。

我解决了这个错误只是为了遇到更多的事情。最好的解决方案是放弃xampp并手动安装mysql / php / perl / etc。