0

我从http://grid.hust.edu.cn/triplebit/TripleBit.tar.gz下载了 TripleBit 的源代码。它需要我安装两个库:

i)  boost-1.39.0.tar.gz
ii) raptor-1.4.21.tar.gz

我使用以下方法安装它们:

sudo apt-get install libboost-dev
sudo apt-get install libraptor-dev

然而,在我进入 TripleBit 的目录并运行“make”之后。我出现以下错误:

/home/TripleBit/BuildTripleBitFromRDF/BuildTripleBit.cpp:38: undefined reference to `raptor_init'
/home/TripleBit/BuildTripleBitFromRDF/BuildTripleBit.cpp:39: undefined reference to `raptor_new_parser'
/home/TripleBit/BuildTripleBitFromRDF/BuildTripleBit.cpp:40: undefined reference to `raptor_set_statement_handler'
/home/TripleBit/BuildTripleBitFromRDF/BuildTripleBit.cpp:42: undefined reference to `raptor_uri_filename_to_uri_string'
/home/TripleBit/BuildTripleBitFromRDF/BuildTripleBit.cpp:43: undefined reference to `raptor_new_uri'
/home/TripleBit/BuildTripleBitFromRDF/BuildTripleBit.cpp:44: undefined reference to `raptor_uri_copy'
/home/TripleBit/BuildTripleBitFromRDF/BuildTripleBit.cpp:45: undefined reference to `raptor_parse_file'
/home/TripleBit/BuildTripleBitFromRDF/BuildTripleBit.cpp:47: undefined reference to `raptor_free_parser'
/home/TripleBit/BuildTripleBitFromRDF/BuildTripleBit.cpp:48: undefined reference to `raptor_free_uri'
/home/TripleBit/BuildTripleBitFromRDF/BuildTripleBit.cpp:49: undefined reference to `raptor_free_uri'
/home/TripleBit/BuildTripleBitFromRDF/BuildTripleBit.cpp:50: undefined reference to `raptor_free_memory'
/home/TripleBit/BuildTripleBitFromRDF/BuildTripleBit.cpp:52: undefined reference to `raptor_finish'
collect2: ld returned 1 exit status
make: *** [bin/lrelease/buildTripleBitFromRDF] Error 1

/usr/local/lib 中的库文件是:

libboost_filesystem.so, libraptor.a, libraptor.la, libraptor.so, libraptor.so.1 
and libraptor.so.1.2.0

驻留在 /usr/lib 中的文件还有:

libraptor.a, libraptor.la, libraptor.so, libraptor.so.1, libraptor.so.1.2.0, 
libraptor2.so.0, libraptor2.so.0.0.0, librasqal.so.3, librasqal.so.3.0.0, librdf.so.0, 
librdf.so.0.0.0, librest-0.7.so.0, librest-0.7.so.0.0.0.

有人可以帮我找出错误。

我在 ubuntu 12.04 上运行它

4

2 回答 2

1

查看 TripleBit Makefile。您缺少 -lraptor 链接器选项。此条目应由 raptor-config --libs 返回。您还可以针对 libraptor.a 文件运行 nm 工具并检查它是否未使用 RAPTOR_DISABLE_V1 选项编译。

于 2013-09-18T20:29:48.087 回答
1

查看 TripleBit Makefile,您可以删除第 82 行(模块:= ..)中的“BuildTripleBitFromRDF”,这样您就可以逃避错误,但“BuildTripleBitFromRDF”不会构建到可执行文件中。所以当你下载的数据集是RDF数据集时,你可以使用raptor将RDF数据集转换为N3数据集,然后使用buildTripleBitFromN3工具继续。可能的问题是在 raptor 中安装错误。

于 2013-09-19T09:29:25.367 回答