内容简介:最近在一台新的liunx服务器上安装sphinx,make后报出如下的错误:在网上百度到有三种解决办法:第一种:
最近在一台新的liunx服务器上安装sphinx,make后报出如下的错误:
/usr/local/src/sphinx-2.3.1-beta/src/sphinx.cpp:28788: undefined reference to `libiconv_open' /usr/local/src/sphinx-2.3.1-beta/src/sphinx.cpp:28806: undefined reference to `libiconv' /usr/local/src/sphinx-2.3.1-beta/src/sphinx.cpp:28812: undefined reference to `libiconv_close' collect2: error: ld returned 1 exit status make[2]: *** [indexer] Error 1 make[2]: Leaving directory `/usr/local/src/sphinx-2.3.1-beta/src' make[1]: *** [all] Error 2 make[1]: Leaving directory `/usr/local/src/sphinx-2.3.1-beta/src' make: *** [all-recursive] Error 1
在网上百度到有三种解决办法:
第一种:
打开configure文件,找到 #define USE_LIBICONV 1
,将注释去掉,并将1改成0。
第二种:
编辑: ./src/MakeFile
文件
将 LIBS = -lm -lexpat -L/usr/local/lib
改成
LIBS = -lm -lexpat -liconv -L/usr/local/lib
第三种:
直接修改 src/sphinx.cpp,将iconv.h 改为绝对路径。
I have the same problem, and I change #include "iconv.h" to #include <iconv.h> to #include </usr/include/iconv.h>
我采取第三种方式最终解决问题。
以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持 码农网
猜你喜欢:- 内网穿透访问Vue项目的时候出现Invalid Host header解决办法
- ORA-01102错误解决办法
- 笨办法学golang(一)
- 笨办法学golang(二)
- 笨办法学golang(三)
- 笨办法学golang(四)
本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。
Java Servlet & JSP Cookbook
Bruce W. Perry / O'Reilly Media / 2003-12-1 / USD 49.99
With literally hundreds of examples and thousands of lines of code, the Java Servlet and JSP Cookbook yields tips and techniques that any Java web developer who uses JavaServer Pages or servlets will ......一起来看看 《Java Servlet & JSP Cookbook》 这本书的介绍吧!