install perl Module

1. search module's package on [Google](https://www.google.com) or [CPAN Search Site](http://search.cpan.org/)
2. download packages into ~/Downloads if it exists
3. Unpack the CPAN Perl module:
    * cd ~/Downloads
    * tar -zxvf ./perl-module.tar.gz
5. specify the installation into ~/perl5
     * cd perl-module/
    * perl Makefile.PL PREFIX=~/perl5
    * make
    * make test
    * make install
6. append ~/.bashrc: export PERL5LIB="$HOME/perl5/:$PERL5LIB";

an alternative way to install perl module -- [cpanm](https://stackoverflow.com/questions/2980297/how-can-i-use-cpan-as-a-non-root-user)
1. install cpanm
    * wget -O- http://cpanmin.us | perl - -l ~/perl5 App::cpanminus local::lib
    * eval `perl -I ~/perl5/lib/perl5 -Mlocal::lib`
    * echo 'eval `perl -I ~/perl5/lib/perl5 -Mlocal::lib`' >> ~/.bashrc
2. then we can install mudules
    * cpanm DateTime [--force]

install Sybase
1. install freetds, http://www.freetds.org
    * wget http://www.freetds.org/files/current/freetds-current.tar.gz
    * tar -zxvf freetds-current.tar.gz
    * cd freetds-dev.1.00.339/
    * ./configure --prefix=$HOME/freetds
    * make
    * make install
2. install Sybase module
    * wget http://search.cpan.org/CPAN/authors/id/M/ME/MEWP/DBD-Sybase-1.16.tar.gz
    * tar -zxvf DBD-Sybase-1.16.tar.gz
    * cd DBD-Sybase-1.16/
    * export SYBASE=$HOME/freetds
    * perl Makefile.PL
    * make
    * make install
3. install DBI
    * cpanm DBI

posted on 2017-05-10 15:22  SimbaStar  阅读(851)  评论(0编辑  收藏  举报