内容简介:最近在一台新的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(四)
本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。
What Technology Wants
Kevin Kelly / Penguin Group (USA) Incorporated / 2010-10-14 / USD 27.95
A refreshing view of technology as a living force in the world. This provocative book introduces a brand-new view of technology. It suggests that technology as a whole is not a jumble of wires and ......一起来看看 《What Technology Wants》 这本书的介绍吧!