• Centos上安装CPAN


    在用一个reads的QC软件:ngShoRT, 这个软件需要配套的String::Approx, PerlIO::gzip, 那只能下载这两个软件。ngShoRT的说明书上写的是需要用CPAN下载,试了一下虚拟机上没有CPAN,那句只能先安装一个。从来没有安装过,表示心中无限无奈。

    不过发现其实也挺简单的,就是先到CPAN的网站(http://search.cpan.org/CPAN/)上先下载一个安装包,也可以用下面的命令行下载wget http://search.cpan.org/CPAN/authors/id/A/AN/ANDK/CPAN-2.16.tar.gz

    下载之后,解压缩,tar -xzvf CPAN-2.16.tar.gz

    然后进入文件目录,cd CPAN-2.16/; 之后执行perl Makefile.PL。每次执行这种代码的时候心里都慌慌的,果不其然,出错了,报错代码"Can't locate ExtUtils/MakeMaker.pm in @INC". 后来查了一下是因为没有安装一个包,于是就借鉴这个博客http://blog.csdn.net/wulantian/article/details/12161343()的内容,安装了yum install perl-ExtUtils-CBuilder perl-ExtUtils-MakeMaker。 看到一个博客说Can’t locate extUtils/makemaker.pm, 需要运行yum -y install perl-CPAN,于是把perl-CPAN也顺带安装了。

     安装好之后,就开始执行在CPAN-2.16这个包中,执行perl Makefile.PL, 没有报错;再执行make, 然后就是make install. 这里都很顺利.

    之后就是启动CAPN, perl -MCPAN -e shell. 然后出来的又是奇怪的东西,不过讲的应该是CPAN的配置,

    CPAN.pm requires configuration, but most of it can be done automatically.
    If you answer 'no' below, you will enter an interactive dialog for each
    configuration option instead.
    Would you like to configure as much as possible automatically? [yes] y
     <install_help>
    Warning: You do not have write permission for Perl library directories.
    To install modules, you need to configure a local Perl library directory or
    escalate your privileges.  CPAN can help you by bootstrapping the local::lib
    module or by configuring itself to use 'sudo' (if available).  You may also
    resolve this problem manually if you need to customize your setup.
    What approach do you want?  (Choose 'local::lib', 'sudo' or 'manual')

      选择了: sudo,之后就来了后面这一段让选择mirror的

    Autoconfigured everything but 'urllist'.
    Now you need to choose your CPAN mirror sites.  You can let me
    pick mirrors for you, you can select them from a list or you
    can enter them by hand.
    Would you like me to automatically choose some CPAN mirror
    sites for you? (This means connecting to the Internet) 

    直接在后面打一个y,CPAN会根据你的地理位置,将离你比较近的mirror地址写入到CPAN的配置文件中。

    之后每次启动的时候,打perl -CPAN -e shell 就能使用了。

    生信小白,对linux的了解有限,半个小时装好了CPAN很激动,汇总一下,希望生信小白们都能装得顺利。

  • 相关阅读:
    使用ansible 批量分发ssh密钥
    修改DNS
    如何使用openssl生成RSA公钥和私钥对
    压力测试 php-fpm 优化
    mysql 安装
    svn 权限配置
    powerdesigner导出word
    Mysql无法创建外键的原因
    office project 激活
    MySQL日志恢复误删记录
  • 原文地址:https://www.cnblogs.com/little-hunter/p/7457107.html
Copyright © 2020-2023  润新知