Jerasure2.0 在Ubuntu上的安装
目录
准备:
1.下载GF-Complete
https://github.com/ceph/gf-complete
2.下载Jerasure
https://github.com/tsuraan/Jerasure
2.安装autoconf automake
sudo apt-get install automake autoconf
2.安装libtool
sudo apt-get install libtool
配置:
1.在项目根目录运行
autoreconf -if
项目目录下会多出m4文件目录, config.h.in文件, Makefile.in文件, configure脚本, compile脚本, depcomp脚本等文件;
2.接着运行
./configure
进行配置生成makefile文件,譬如enbale/disbale一些特性,设置交叉编译平台(例如--host=linux-mips),设置编译安装目录(例如--prefix=path_to_your_build_directory)具体可以查看help信息;
3.执行
make
运行Makefile文件
4.执行
sudo make install
此时可以看到Examples里面有了可执行文件,但是此时运行这些文件会出现错误:
error while loading shared libraries: libXXXXXXX.so.1: cannot open shared object file: No such file or directory
在明确已经安装该库的情况下出现上述错误,可能是因为这个库目录并没有加入到该环境变量中,需要进行以下步骤:
一般安装目录在
/usr/local/lib
将该目录加入到共享库的配置文件中
sudo sh -c "echo '/usr/local/lib' >> /etc/ld.so.conf"
sudo ldconfig
执行完以上操作,再到Examples里就可以成功运行示例了。
错误解决方法:
在执行autoconf的时候出现以下错误:
error: possibly undefined macro: AM_INIT_AUTOMAKE
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
configure.ac:25: error: possibly undefined macro: AM_PROG_CC_C_O
configure.ac:27: error: possibly undefined macro: AC_LIBTOOL_WIN32_DLL
configure.ac:28: error: possibly undefined macro: AC_PROG_LIBTOOL
configure.ac:30: error: possibly undefined macro: AM_PROG_LEX
configure.ac:100: error: possibly undefined macro: AM_CONDITIONAL
解决方法:
运行
autoreconf --install
参考资料:
https://www.cnblogs.com/bugutian/p/5560548.html
https://blog.csdn.net/u010020404/article/details/82770848
https://blog.csdn.net/wanxuexiang/article/details/84574660
https://blog.csdn.net/weixin_43046653/article/details/86157081