Destor安装

Destor
Destor is a platform for data deduplication evaluation.

安装Destor
源码
源码:https://github.com/fomy/destor

环境
Linux 64bit, ubuntu

依赖
libssl-dev is required to calculate sha-1 digest;

GLib 2.32 or later version

libglib.so and glib.h may not be found when you first install it.

The header files (that originally locate in /usr/local/include/glib-2.0 and /usr/local/lib/glib-2.0/include) are required to be moved to a searchable path, such as “/usr/local/include”.

Also a link named libglib.so should be created in “/usr/local/lib”.

Makefile is automatically generated by GNU autoconf and automake.

步骤
一、安装libssl-dev
Update the package index:(可忽略)

sudo apt-get update
1
Install libssl-dev deb package:

sudo apt-get install libssl-dev
1
二、安装glib-2.32
下载地址glib2.32:http://www.linuxfromscratch.org/~thomasp/blfs-book-xsl/general/glib2.html

解压

tar -xvf glib2.32.tar.gz
1
在glib-2.32文件夹下执行

./configure
make
make install
1
2
3
pkg-config问题

出现Package requirements (libffi >= 3.0.0) were not met:

下载了pkg-config-0.29.1.tar.gz (链接地址:https://www.freedesktop.org/wiki/Software/pkg-config/),解压后执行以下命令

./configure
make
make install
1
2
3
如果./configure出现configure: error: Either a previously installed pkg-config or "glib-2.0 >= 2.16" could not be found.

则需要

./configure --with-internal-glib
1
ps:pkg-config能根据软件安装时软件的.pc配置文件路径找到相应的头文件路径和库文件路径

libffi问题

如果出现Package requirements (libffi >= 3.0.0) were not met

下载libffi-3.2.1.tar.gz(链接地址:http://sourceware.org/libffi/),解压后执行以下命令

./configure
make
make install
1
2
3
gettext问题

如果出现You must have either have gettext support in your C library, or use theGNU gettext library.而gettext命令又可以执行

需要下载源代码重装gettext,不使用apt-get,在gettext目录执行以下命令

./configure
make
make install
1
2
3
pcre问题

如果出现 error: Package requirements (libpcre >= 8.13) were not met:

下载pcre-8.38.tar.gz(链接地址:https://sourceforge.net/projects/pcre/files/pcre/),解压执行以下命令

./configure --enable-utf8 --enable-unicode-properties
make
make install
1
2
3
如果出现configure: error: You need a C++ compiler for C++ support,代表linux没支持c++编译,执行以下命令

sudo apt-get install build-essential
1
其它可参考链接:https://www.cnblogs.com/pcat/p/5520317.html

如果出现Cannot --enable-pcregrep-libbz2 because bzlib.h was not found [closed],执行以下命令

sudo yum install libbz2-dev
1
如果出现while loading shared libraries: libgettextsrc-0.21.so,执行以下命令

# 一般安装目录在
#/usr/local/lib
#将该目录加入到共享库的配置文件中
echo "/usr/local/lib" >> /etc/ld.so.conf
ldconfig
1
2
3
4
5
三、改变glib的位置
根据依赖2,需要改变glib文件的位置需要将/usr/local/include/glib-2.0和/usr/local/lib/glib-2.0/include下的所有文件复制到/usr/local/include下,执行如下命令

cp /usr/local/include/glib-2.0/* /usr/local/include/
cp -r /usr/local/include/glib-2.0/* /usr/local/include/
cp /usr/local/lib/glib-2.0/include/* /usr/local/include
1
2
3
四、替换libglib-2.0.so
将/usr/local/lib下的libglib-2.0.so复制为libglib.so

cp /usr/local/lib/libglib-2.0.so /usr/local/lib/libglib.so
1
五、编译destor
在destor-master文件下依次执行

./configure
make
make install # 没有出错,说明安装成功
# 可以使用如下命令查看destor
destor -h
1
2
3
4
5
如果出现Makefile:333: recipe for target 'aclocal.m4' failed,执行以下命令

sudo apt-get install autoconf
autoreconf -vfi
1
2
如果出现glib not found回到步骤2, 查看glib是否安装成功

如果出现glib.h not found回到步骤3,4,查看文件是否复制成功

参考
Glib安装:https://www.cnblogs.com/pcat/p/5520317.html

Destor安装:http://blog.sina.com.cn/s/blog_e23a215b0102x4yo.html
————————————————
版权声明:本文为CSDN博主「匆匆那年s」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/qq_28626013/article/details/111187037

posted @ 2022-04-26 10:46  坑总很忙  阅读(515)  评论(0)    收藏  举报