安装
uname -a
### 输出: "Linux vmDeb 3.2.0-4-686-pae #1 SMP Debian 3.2.46-1 i686GNU/Linux"
apt-get install build-essential xutils-dev -y
### xutils-dev中含有makedepend
tar -zxvf larbin-2.6.3.tar.gz
cd larbin-2.6.3/
chmod uog+x configure
./configure
### 如果不安装xutils-dev,这里会报错"make[2]: *** [dep-in] 错误 127", 是因为没有makedepend
make
### make中出现的错误解决方案见文件 : "Larbin安装中的错误的解决.mht"
#其中遇到问题:
# "/usr/include/i386-linux-gnu/asm/posix_types.h:2:30: fatal error: posix_types_32.h: 没有那个文件或目录"
# "In file included from /usr/include/linux/posix_types.h:47:0,"
#将/usr/include/linux/posix_types.h的47行注释掉,再make即可
./larbin
#即可运行起labrin了
"Larbin安装中的错误的解决.mht"来自网络,内容如下:
1、到网上下载 larbin-2.6.3.tar.gz,然后解压。
tar zxvf larbin-2.6.3.tar.gz
2、 到解压的目录,运行配置文件
./configure
|
却出现以下的错误:
make[2]: 正在进入目录 `/home/byd/test/larbin-2.6.3/src/utils'
makedepend -f- -I.. -Y *.cc 2> /dev/
null
> .depend
make[2]: *** [dep-
in
] 错误 127
make[2]:正在离开目录 `/home/byd/test/larbin-2.6.3/src/utils'
make[2]: 正在进入目录 `/home/byd/test/larbin-2.6.3/src/interf'
<span style=
"color: rgb(255, 0, 0);"
><strong>makedepend</strong></span> -f- -I.. -Y *.cc 2> /dev/
null
> .depend
make[2]: *** [dep-
in
] 错误 127
make[2]:正在离开目录 `/home/byd/test/larbin-2.6.3/src/interf'
make[2]: 正在进入目录 `/home/byd/test/larbin-2.6.3/src/fetch'
makedepend -f- -I.. -Y *.cc 2> /dev/
null
> .depend
make[2]: *** [dep-
in
] 错误 127
make[2]:正在离开目录 `/home/byd/test/larbin-2.6.3/src/fetch'
make[1]: *** [dep] 错误 2
make[1]:正在离开目录 `/home/byd/test/larbin-2.6.3/src'
make: *** [dep] 错误 2
|
在上面发现有makedepend,于是输入
makedepend
|
发现没有安装,有如下的提示
The program
'makedepend'
is
currently not installed. You can install it by typing:
sudo apt-
get
install xutils-dev
|
于是就输入命令老老实实的安装xutils-dev了
sudo apt-
get
install xutils-dev
|
安装之后,./configure成功
3、编译
在目录下输入make进行编译。又出现了一下的错误
parse.c:113: error: conflicting types
for
‘adns__parse_domain’
internal
.h:569: note: previous declaration of ‘adns__parse_domain’ was here
parse.c: In function ‘adns__parse_domain_more’:
|
于是直接到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 ,又出现一下的错误
sequencer.cc:5: fatal error: iostream.h: 没有那个文件或目录
|
代码采用的是以前C的编码方式,现在要改成iostream 了。于是将目录下的所有iostream.h 改成iostream。可以采用一下的命令
sed -i -e
's/iostream.h/iostream/g'
`grep -rl iostream.h *`
|
注意:后面的包含grep 的不是单引号,而是键盘左上角的符号。
继续编译,又出现错误
hashTable.cc:32: error: ‘cerr’ was not declared in
this
scope
hashTable.cc:41: error: ‘cerr’ was not declared in
this
scope
hashTable.cc:42: error: ‘endl’ was not declared in
this
scope
|
于是将目录下的所有cerr和 endl改成 std::cerr和std::endl。可以采用类似上面的命令。不过要注意是不是有的endl或cerr已经是std::endl和std::cerr。
sed -i -e
's/cerr/std::cerr/g'
`grep -rl cerr *`
|
sed -i -e
's/endl/std::endl/g'
`grep -rl endl *`
|
至此编译就没有问题了。
可以发现在目录下已经生成larbin的可执行文件。
输入./larbin就可以运行larbin了。
使用
options.h可以控制larbin获取到网页后的行为(是啥也不做,还是保存网页),
但是修改options.h后,必须要重新编译,即执行:
./configure && make