perl非root用户安装模块

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

转载于:https://www.cnblogs.com/starRebel/p/6755477.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值