Coreseek /usr/local/coreseek/bin/indexer: error while loading shared libraries: libmysqlclient.so.18: cannot open shared object file: No such file or directory
tar xzvf coreseek-4.1-beta.tar.gz cd coreseek-4.1-beta cd mmseg-3.2.14 ./bootstrap ./configure --prefix=/usr/local/mmseg3 make && make install cd ../csft-4.1 sh buildconf.sh ./configure --prefix=/usr/local/coreseek --without-unixodbc --with-mmseg --with-mmseg-includes=/usr/local/mmseg3/include/mmseg/ --with-mmseg-libs=/usr/local/mmseg3/lib/ --with-mysql #make出现问题解决方法 sed -i 's/-ldl -lm -lz -lexpat -L\/usr\/local\/lib -lrt -lpthread/-lm -lexpat -liconv -L\/usr\/local\/lib/g' src/Makefile sed -i 's/lmysqlclient -lpthread -lm -lrt -ldl/lmysqlclient -lpthread -lm -lrt -ldl -lz/g' src/Makefile
make && make install
#测试mmseg分词,coreseek搜索(需要预先设置好字符集为zh_CN.UTF-8,确保正确显示中文)cd ../testpack/ cat var/test/test.xml #此时应该正确显示中文 /usr/local/mmseg3/bin/mmseg -d /usr/local/mmseg3/etc var/test/test.xml /usr/local/coreseek/bin/indexer -c etc/csft.conf --all ——》/usr/local/coreseek/bin/indexer: error while loading shared libraries: libmysqlclient.so.18: cannot open shared object file: No such file or directory
发现sphinx indexer依赖库ibmysqlclient.so.18找不到,通过编辑此文件来修复这个错误 /etc/ld.so.conf
vi /etc/ld.so.conf
将下面这句加到文件到尾部,并保存文件
/usr/local/mysql/lib
然后运行下面这个命令即可 ldconfig
Coreseek /usr/local/coreseek/bin/indexer: error while loading shared libraries: libmysqlclient.so.18: cannot open shared object file: No such file or directory
|