Linux上安装Tarball软件------以MUMmer为例

下文以一个生物信息学小软件MUMmer为例,说明一下tarball软件的安装流程。
根据mummer软件Github上install and readme: INSTALL.md

Dependencies
If compiling from a release source tarball you need a recent version of the GCC compiler (g++ version >= 4.7) and other essential tools for compilation (GNU make, ar, etc. Install build-essentials on Debian or Ubuntu derivatives). Additional requirements are needed to compile the SWIG script bindings. See the SWIG installation guide.

If compiling from the github development tree, additionally you need autotools(autoconf, automake and libtools), yaggo. You should compile from a release source tarball, unless you plan on modifying the code of MUMmer.

软件安装过程

直接使用root权限安装gcc
sudo apt-get install build-essential
然后以为可以使用编译了,于是
./configure --prefix=/path/to/installation
结果提示
bash: ./configure: No such file or directory
原来是因为我是从Git下载,没有configure文件,所以我需要使用autoconf建立configure文件,继续下载
sudo apt-get install autoconf
下载完成后按照正确操作autoreconf -fi 仍然报错

configure.ac:8: error: possibly undefined macro: AC_PROG_LIBTOOL

      If this token and others are legitimate, please use 
m4_pattern_allow.

      See the Autoconf documentation.

autoreconf: /usr/bin/autoconf failed with exit status: 1

这种错误的其中一个原因是目录中没有安装libtool,于是安装libtool 和libsysfs-dev

sudo apt-get install libtool
sudo apt-get install libsysfs-dev

安装完成后进行编译

autoreconf -fi
./configure --prefix=path
make

make时报错

  YAGGO    src/umd/nucmer_cmdline.hpp
Makefile:2791: recipe for target 'src/umd/nucmer_cmdline.hpp' 
failed
make: *** [src/umd/nucmer_cmdline.hpp] Error 1

一开始使用关键“make Error 1”并未发现与我相似的错误,于是我回过头去检查Makefile:2791行,这一行的代码如下:

.yaggo.hpp:
    $(V_YAGGO)$(YAGGO) -o $@ $<

检查变量

YAGGO = false
V_YAGGO = $(V_YAGGO_$(V))
V_YAGGO_ = $(V_YAGGO_$(AM_DEFAULT_VERBOSITY))
V_YAGGO_0 = @echo "  YAGGO   " $@;
YAGGO_BUILT = src/umd/nucmer_cmdline.hpp \
    tests/generate_sequences_cmdline.hpp \
    tests/ufasta_src/dsort_cmdline.hpp \
    tests/ufasta_src/sort_cmdline.hpp \
    tests/check_cigar_cmdline.hpp tests/check_LCP_cmdline.hpp

在stackoverflow上检索,发现与我问题相似的有很多答案,原来是

在configure的时候check安装环境,check的结果

checking for yaggo... false
checking for gnuplot... no
checking for gnuplot5... no
checking for gnuplot4... no

结果为false or no的软件安装没有注意到,所以导致了下一步的错误
安装yaggo, gnuplot然后 删除之前的可执行文件,重新再来吧

sudo apt-get install yaggo
sudo apt-get install  gnuplot

一切准备就绪后。。。。

autoreconf -fi
./configure --prefix=/path/to/installation
make clean
make
make install

安装非常的顺利,这里我多了一个步骤 make clean,关于这个的原因请参考我的另一篇文章[源码与tarball软件安装]

心路历程

系统的配置是需要大量的时间的,包括软件下载的时间,安装的时间,而且中间还有很多的bug,一个一个不断的补充,才能更加完善。当然最重要的问题在于自己基础知识的积累不够以及粗心大意所以才挖了这么多的坑。欢迎小伙伴们一起讨论软件安装那些事儿!

参考资料

  1. 软件安装说明
  2. 源码与tarball软件安装
  3. 《鸟哥私房菜》
  4. Ubuntu下gcc安装及使用
  5. Stack Overflow,Ask Ubuntu, CSDN等博客网站

欢迎大家一起讨论软件安装的心路历程,同时欢迎大佬们指正。
我是新手:夏夏

你可能感兴趣的:(Linux上安装Tarball软件------以MUMmer为例)