perl用cpan安装模块常见错误

  1. make: yacc: Command not found
  2. yum install -y bison
  3. yum install -y byacc.i386
  4.  
  5.  
  6. Could not load the pcap library
  7. 32位:
  8. yum install -y libpcap.i386
  9. yum install -y libpcap-devel.i386
  10. 64位:
  11. yum install -y libpcap.x86_64
  12. yum install -y libpcap-devel.x86_64
  13.  
  14. make: *** No rule to make target `/usr/lib64/perl5/CORE/config.h', needed by `Makefile'.  Stop.
  15. yum install -y perl-devel.x86_64

cpanm-perl的cpan升级版

cpanm是一个集查询,安装,卸载perl模块的工具

  1. #下载cpanm
  2. wget https://raw.github.com/miyagawa/cpanminus/master/cpanm -O /usr/local/bin/cpanm --no-check-certificate && chmod +x /usr/local/bin/cpanm
  3. cpanm Your_Module_Name #安装模块
  4. cpanm http://baiqiuyi.com/Your_Module_Name #支持http模式安装模块
  5. cpanm --mirror #指定镜像
  6. 其他具体man cpanm
1 1