circos模块安装

Circos安装

  1. 下载软件包

    http://circos.ca/software/download/circos/

  2. 解压

    tar -xvzf circos*.tgz

  3. 安装模块

1
2
3
4
5
6
7
8
9
10
#查看依赖项是否安装
cd circos*
./bin/circos -module
#####输出结果
ok 1.26 Carp
missing Clone
missing Config::General
ok 3.40 Cwd
ok 2.145 Data::Dumper
ok 2.52 Digest::MD5

[推荐]使用cpanm安装模块

手动安装local::lib模块

  • 这里我将所有的perl模块都装到~/perl_lib自定义目录
1
2
3
4
5
wget https://cpan.metacpan.org/authors/id/H/HA/HAARG/local-lib-2.000024.tar.gz
tar xf local-lib-2.000024.tar.gz
cd local-lib-2.000024
perl Makefile.PL --bootstrap=~/perl_lib
make test && make install

设置环境变量

命令行运行如下命令:

1
perl -I${HOME}/自定义目录/lib/perl5 -Mlocal::lib=${HOME}/自定义目录

输出内容

1
2
3
4
5
PATH="******"; export PATH;
PERL5LIB="******"; export PERL5LIB;
PERL_LOCAL_LIB_ROOT="****${PERL_LOCAL_LIB_ROOT:+:${PERL_LOCAL_LIB_ROOT}}"; export PERL_LOCAL_LIB_ROOT;
PERL_MB_OPT="--install_base \"*****""; export PERL_MB_OPT;
PERL_MM_OPT="INSTALL_BASE=****"; export PERL_MM_OPT;

复制输出结果,粘贴到~/.bashrc文件内,

source ~/.bashrc即可

安装cpanm

1
2
3
4
5
wget https://cpan.metacpan.org/authors/id/M/MI/MIYAGAWA/App-cpanminus-1.7043.tar.gz
tar xf App-cpanminus-1.7043.tar.gz
cd App-cpanminus-1.7043
perl Makefile.PL
make test && make install

使用cpanm

1
2
3
cpanm 模块名
#批量安装缺失模块
circos -module|awk '$1~/missing/{print $2}'|xargs -I {} cpanm {}

手动安装

从CPAN https://www.cpan.org/ 下载对应的模块源文件

手动安装的配置信息文件 perl_local_config

1
2
3
4
5
6
module_path=/public/home/zpliu/perl_lib/
PREFIX= ${module_path}
INSTALLSCRIPT= ${module_path} /bin
INSTALLBIN= ${module_path} /bin
INSTALLMAN1DIR= ${module_path} /man1
INSTALLSITELIB= ${module_path} /lib
  • PREFIX指定build后路径
1
2
3
4
5
6
7
8
9
#解压源文件
tar -xvzf Clone-0.43.tar.gz
#编译,指定build目标路径
perl Makefile.PL `cat ../perl_local_config `
make
make test
make install
#将路径加入环境变量
export PERL5LIB=/public/home/zpliu/perl_lib/lib/:/public/home/zpliu/perl_lib/lib/Module/lib64/perl5/:/public/home/zpliu/perl_lib/lib/Module/share/perl5/

Build.pl类型模块的安装

首先得安装module::build模块

1
2
3
4
5
6
perl build --prefix=/public/home/zpliu/perl_lib/
./Build build
./Build test
./Build install
#添加环境变量
export PERL5LIB=/public/home/zpliu/perl_lib/lib/:/public/home/zpliu/perl_lib/lib/Module/lib64/perl5/:/public/home/zpliu/perl_lib/lib/Module/share/perl5/
1
2
3
4
perl Build.PL --prefix=/public/home/zpliu/perl_lib/lib/Module/
./Build build
./Build test
./Build install

报错

Can’t locate ExtUtils/PkgConfig.pm

缺失依赖项``ExtUtils::PkgConfig`同样的安装ExtUtils::PkgConfig模块

查看perl中已经安装的模块

instmodsh

参考

  1. perl模块安装 https://www.zhihu.com/question/28532172
  2. cpanm https://www.jianshu.com/p/9e90b3524fe2
------ 本文结束 thankyou 感谢阅读 ------

欢迎扫一扫上面的微信二维码,订阅 codeHub 公众号