0

我已经成功安装了 openfst 和 thraxcompiler。thraxmakedep 成功创建 make 文件

thraxOpenGrm/thrax-1.1.0/src/grammars$ thraxmakedep example.grm

创建make文件后,当我运行make时出现以下错误

thraxOpenGrm/thrax-1.1.0/src/grammars$ make
thraxcompiler --input_grammar=byte.grm --output_far=byte.far
thraxcompiler: error while loading shared libraries: libthrax.so.0: cannot open shared object file: No such file or directory
make: *** [byte.far] Error 127

但是该库存在于路径中:

/usr/local/lib/libthrax.so.0

我尝试了一些适用于 gcc 编译器的步骤,例如 使用,等export LD_LIBRARY_PATH=/usr/local/lib标志。-Wl,-rpath-Llib

4

2 回答 2

0

由于 Thrax 编译器无法找到所需的库,因此会出现此问题。执行命令sudo ldconfig修复它。

或者,可以通过将该库(libthrax.so.0)复制到/usr/lib/

于 2015-03-30T15:54:32.803 回答
0

另一种选择是设置它,以便它可以找到共享库:

export LD_LIBRARY_PATH=/usr/local/lib
于 2015-09-01T00:19:44.577 回答