国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 編程 > Perl > 正文

cpanm安裝及Perl模塊安裝教程

2020-06-04 20:32:50
字體:
供稿:網(wǎng)友

cpanm是安裝Perl模塊的最方便的方法。自動下載安裝依賴包。使用CPAN shell或下載源碼包安裝模塊,遇到大量依賴關(guān)系,非常頭痛。下面就是一例:

安裝MongoDB模塊

代碼如下:
# perl Makefile.PL
Warning: prerequisite Class::Method::Modifiers 0 not found.
Warning: prerequisite Data::Types 0 not found.
Warning: prerequisite DateTime 0 not found.
Warning: prerequisite DateTime::Tiny 0 not found.
Warning: prerequisite ExtUtils::MakeMaker 6.59 not found. We have 6.30.
Warning: prerequisite File::Slurp 0 not found.
Warning: prerequisite File::Temp 0.17 not found. We have 0.16.
Warning: prerequisite JSON 0 not found.
Warning: prerequisite Moose 0 not found.
Warning: prerequisite Test::Exception 0 not found.
Warning: prerequisite Test::Warn 0 not found.
Warning: prerequisite Tie::IxHash 0 not found.
Warning: prerequisite Try::Tiny 0 not found.
Warning: prerequisite boolean 0 not found.
Writing Makefile for MongoDB

1. 安裝cpanm

cpanm其實是一個可執(zhí)行文件而已。將它下載到bin目錄,然后添加執(zhí)行權(quán)限就可以了。

代碼如下:
# wget http:
//xrl.us/cpanm -O /usr/bin/cpanm; chmod +x /usr/bin/cpanm

2. 使用cpanm安裝模塊

代碼如下:
# cpanm -h
  -v,--verbose              Turns on chatty output
  -q,--quiet                Turns off the most output
  --interactive             開啟交互配置(required for Task:: modules)
  -f,--force                強制安裝
  -n,--notest               Do not run unit tests
  --test-only               只測試不安裝
  -S,--sudo                 sudo to run install commands
  --installdeps             只安裝依賴模塊
  --showdeps                只顯示依賴信息
  --reinstall               重新安裝
  --mirror                  指定鏡像url (e.g. http://cpan.cpantesters.org/)
  --mirror-only             只從鏡像下載
  --prompt                  Prompt when configure/build/test fails

發(fā)表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發(fā)表
主站蜘蛛池模板: 大名县| 岳西县| 弥渡县| 二手房| 扶沟县| 航空| 南平市| 平阳县| 彭水| 环江| 长春市| 家居| 南京市| 措美县| 建瓯市| 封丘县| 吉木乃县| 万宁市| 绥中县| 河南省| 白银市| 七台河市| 华容县| 通海县| 波密县| 金堂县| 团风县| 禹城市| 德州市| 页游| 石首市| 灵武市| 贵溪市| 平山县| 广州市| 中阳县| 盘山县| 囊谦县| 巩义市| 历史| 微山县|