C++ 安装Open GRM thrax时出错

C++ 安装Open GRM thrax时出错,c++,ubuntu-14.04,text-mining,text-analysis,openfst,C++,Ubuntu 14.04,Text Mining,Text Analysis,Openfst,我已经在Ubuntu中安装了OpenFST,它运行良好。现在我正在尝试安装Open GRM thrax。我已尝试使用两个不同版本的thrax进行安装 Thrax版本1.1.0: thraxOpenGrm/thrax-1.1.0$ ./configure 下面是我得到的错误 checking how to hardcode library paths into programs... immediate checking for bison... no checking for byacc...

我已经在Ubuntu中安装了OpenFST,它运行良好。现在我正在尝试安装Open GRM thrax。我已尝试使用两个不同版本的thrax进行安装

Thrax版本1.1.0:

thraxOpenGrm/thrax-1.1.0$ ./configure
下面是我得到的错误

checking how to hardcode library paths into programs... immediate
checking for bison... no
checking for byacc... no
checking for std::tr1::hash<long long unsigned>... yes
checking for __gnu_cxx::slist<int>... yes
checking fst/fst.h usability... yes
checking fst/fst.h presence... no
configure: WARNING: fst/fst.h: accepted by the compiler, rejected by the preprocessor!
configure: WARNING: fst/fst.h: proceeding with the compiler's result
checking for fst/fst.h... yes
checking fst/extensions/far/far.h usability... yes
checking fst/extensions/far/far.h presence... no
configure: WARNING: fst/extensions/far/far.h: accepted by the compiler, rejected by the preprocessor!
configure: WARNING: fst/extensions/far/far.h: proceeding with the compiler's result
checking for fst/extensions/far/far.h... yes
checking fst/extensions/pdt/pdt.h usability... no
checking fst/extensions/pdt/pdt.h presence... no
checking for fst/extensions/pdt/pdt.h... no
configure: error: fst/extensions/pdt/pdt.h header not found
checking how to hardcode library paths into programs... immediate
checking for bison... no
checking for byacc... no
checking for std::tr1::hash<long long unsigned>... yes
checking for __gnu_cxx::slist<int>... yes
checking fst/fst.h usability... no
checking fst/fst.h presence... no
checking for fst/fst.h... no
configure: error: fst/fst.h header not found
下面是我得到的错误

checking how to hardcode library paths into programs... immediate
checking for bison... no
checking for byacc... no
checking for std::tr1::hash<long long unsigned>... yes
checking for __gnu_cxx::slist<int>... yes
checking fst/fst.h usability... yes
checking fst/fst.h presence... no
configure: WARNING: fst/fst.h: accepted by the compiler, rejected by the preprocessor!
configure: WARNING: fst/fst.h: proceeding with the compiler's result
checking for fst/fst.h... yes
checking fst/extensions/far/far.h usability... yes
checking fst/extensions/far/far.h presence... no
configure: WARNING: fst/extensions/far/far.h: accepted by the compiler, rejected by the preprocessor!
configure: WARNING: fst/extensions/far/far.h: proceeding with the compiler's result
checking for fst/extensions/far/far.h... yes
checking fst/extensions/pdt/pdt.h usability... no
checking fst/extensions/pdt/pdt.h presence... no
checking for fst/extensions/pdt/pdt.h... no
configure: error: fst/extensions/pdt/pdt.h header not found
checking how to hardcode library paths into programs... immediate
checking for bison... no
checking for byacc... no
checking for std::tr1::hash<long long unsigned>... yes
checking for __gnu_cxx::slist<int>... yes
checking fst/fst.h usability... no
checking fst/fst.h presence... no
checking for fst/fst.h... no
configure: error: fst/fst.h header not found
正在检查如何将库路径硬编码到程序中。。。立即的
检查野牛。。。不
正在检查byacc。。。不
正在检查std::tr1::哈希。。。对
正在检查_gnu_cxx::slist。。。对
正在检查fst/fst.h可用性。。。不
正在检查fst/fst.h是否存在。。。不
正在检查fst/fst.h。。。不
配置:错误:未找到fst/fst.h头
它使用不同的thrax版本抛出不同的错误。我在这个论坛上读到了一个解决方案


它说openfst必须使用
/configure--enable far=true
来“构建”。我卸载了openfst,并使用
/configure--enable far=true
/configure--enable far
安装了它。错误仍然存在

我会尝试删除针对的openfst,然后在系统上进行查找,以确保所有fst/fst.h文件都已删除。它可能缺少一些东西,或者其他包可能提供了一个


此外,--enable far的结尾不应该有=true。所以,也许可以这样尝试。

如果您指定./configure--enable far=true,它应该可以工作。因为它将在/usr/local/include下安装fst文件夹(安装opengrm时应运行make install)

然后,您可能会遇到如下错误:
fst/extensions/pdt/pdt.h头未找到


在安装openfst期间,您可以添加--enable pdt=true。/configure opengrm

,您必须键入:

./configure --enable-far=true --enable-pdt=true --enable-mpdt=true
然后您应该安装thrax,并在其上键入terminal:

export LD_LIBRARY_PATH=/usr/local/lib
在openfst-1.5.4和thrax-1.2.2中为我工作

当我得到:

checking fst/extensions/pdt/pdt.h usability... no
我补充说:

--enable-pdt=true

为openfst配置,我对mpdt错误也做了同样的操作。如果您遇到其他错误,可以尝试执行相同的操作。

我假设您在安装openfst时不只是进行配置,而是先进行“make”,然后进行“make install”。只进行make和make install是不起作用的。我试过了/配置是必要的。是的,您必须执行这三项操作。