larbin解读(1) --安装

larbin的安装比较简单,直接按照使用说明就可以了。

在u8.10上安装的过程为:

1解压

tar -xvzf larbin-2.6.3.tar.gz

2.生成配置文件

/.configure

这个时候出现错误:

make[1]: Entering directory `/home/wei/larbin-2.6.3/src'
cp ../config.h .
for d in utils interf fetch; do (cd $d; make dep-in); done
make[2]: Entering directory `/home/wei/larbin-2.6.3/src/utils'
makedepend -f- -I.. -Y *.cc 2> /dev/null > .depend
make[2]: *** [dep-in] Error 127
make[2]: Leaving directory `/home/wei/larbin-2.6.3/src/utils'
make[2]: Entering directory `/home/wei/larbin-2.6.3/src/interf'
makedepend -f- -I.. -Y *.cc 2> /dev/null > .depend
make[2]: *** [dep-in] Error 127
make[2]: Leaving directory `/home/wei/larbin-2.6.3/src/interf'
make[2]: Entering directory `/home/wei/larbin-2.6.3/src/fetch'
makedepend -f- -I.. -Y *.cc 2> /dev/null > .depend
make[2]: *** [dep-in] Error 127
make[2]: Leaving directory `/home/wei/larbin-2.6.3/src/fetch'
make[1]: *** [dep] Error 2
make[1]: Leaving directory `/home/wei/larbin-2.6.3/src'
make: *** [dep] Error 2

发现有命令:makedepend

于是:makedepend

提示:The program 'makedepend' is currently not installed.  You can install it by typing:
sudo apt-get install xutils-dev

 

所以:sudo apt-get install xutils-dev

 

完了以后直接./configure 成功!

 

3.编译

按照说明直接make发现错误

arse.c: In function ‘vbuf__append_quoted1035’:
parse.c:46: warning: pointer targets in passing argument 2 of ‘adns__vbuf_append’ differ in signedness
parse.c: In function ‘adns__findlabel_next’:
parse.c:75: warning: pointer targets in assignment differ in signedness
parse.c: At top level:
parse.c:113: error: conflicting types for ‘adns__parse_domain’
internal.h:569: error: previous declaration of ‘adns__parse_domain’ was here
parse.c: In function ‘adns__parse_domain_more’:
parse.c:138: warning: pointer targets in passing argument 2 of ‘adns__vbuf_append’ differ in signedness
parse.c:155: warning: pointer targets in passing argument 2 of ‘adns__vbuf_append’ differ in signedness

 

直接在:adns中的internal.h注释:()

568-572行

/*
adns_status adns__parse_domain(adns_state ads, int serv, adns_query qu,
                   vbuf *vb, parsedomain_flags flags,
                   const byte *dgram, int dglen, int *cbyte_io, int max);
*/

后make

出现错:

input.cc:6:22: error: iostream.h: No such file or directory
input.cc: In function ‘int input()’:
input.cc:70: warning: deprecated conversion from string constant to ‘char*’
input.cc:91: warning: deprecated conversion from string constant to ‘char*’
input.cc:128: warning: deprecated conversion from string constant to ‘char*’
input.cc: In function ‘bool readMore(Input*)’:
input.cc:147: warning: deprecated conversion from string constant to ‘char*’
input.cc: In function ‘void initInput()’:
input.cc:203: error: ‘cerr’ was not declared in this scope
make[2]: *** [input.o] Error 1
make[2]: Leaving directory `/home/wei/larbin-2.6.3/src/interf'
make[2]: Entering directory `/home/wei/larbin-2.6.3/src/fetch'

 

所有的 都要修改为

所有的cerr,endl都要修改为std::cerr, std::endl,不过要注意的是,有些地方已经是std::endl了

 

通过这些,你便可以编译通过larbin了,下一步便是配置larbin

 

 

 


 

 

 

你可能感兴趣的:(larbin解读(1) --安装)