a亚洲精品_精品国产91乱码一区二区三区_亚洲精品在线免费观看视频_欧美日韩亚洲国产综合_久久久久久久久久久成人_在线区

首頁 > 編程 > Perl > 正文

cpanm安裝及Perl模塊安裝教程

2020-02-23 19:45:32
字體:
供稿:網(wǎng)友

CPANM是安裝Perl模塊最方便的方法,自動下載和安裝依賴項包。使用cpan shell或下載源程序包來安裝模塊,您會遇到很多依賴項,并且頭疼,下面武林技術頻道就為大家?guī)韈panm安裝及Perl模塊安裝教程。

下面就是一例:

安裝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í)行權限就可以了。

?

?

# 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
? -l,--local-lib??????????? Specify the install base to install modules
? -L,--local-lib-contained? Specify the install base to install all non-core modules
? --self-contained????????? Install all non-core modules, even if they're already installed.
? --auto-cleanup??????????? Number of days that cpanm's work directories expire in. Defaults to 7

?

? Examples:
? cpanm Test::More????????????????????????????????????????? # install Test::More
? cpanm MIYAGAWA/Plack-0.99_05.tar.gz?????????????????????? # full distribution path
? cpanm http://example.org/LDS/CGI.pm-3.20.tar.gz?????????? # install from URL
? cpanm ~/dists/MyCompany-Enterprise-1.00.tar.gz??????????? # install from a local file
? cpanm --interactive Task::Kensho????????????????????????? # Configure interactively
? cpanm .?????????????????????????????????????????????????? # install from local directory
? cpanm --installdeps .???????????????????????????????????? # install all the deps for the current directory
? cpanm -L extlib Plack???????????????????????????????????? # install Plack and all non-core deps into extlib
? cpanm --mirror http://cpan.cpantesters.org/ DBI?????????? # use the fast-syncing mirror

?

參數(shù)名直接為模塊名稱

如,安裝MongoDB模塊

?

?

# cpanm MongoDB
--> Working on MongoDB
Fetching http://www.cpan.org/authors/id/F/FR/FRIEDO/MongoDB-0.702.0.tar.gz ... OK
Configuring MongoDB-0.702.0 ... OK
==> Found dependencies: DateTime, Tie::IxHash, Data::Types, DateTime::Tiny, Class::Method::Modifiers, boolean, Moose, File::Slurp, Try::Tiny, Test::Exception, ExtUtils::MakeMaker, Test::Warn, File::Temp, JSON
--> Working on DateTime
......? //自動解決依賴模塊

?

為了加快下載速度, 可以指定使用鏡像,并只從鏡像下載:

?

?

# cpanm --mirror http:
//mirrors.163.com/cpan --mirror-only MongoDB

?

3. 刪除模塊

安裝App::pmuninstall模塊:

?

# cpanm App::pmuninstall

?

4.刪除模塊

?

?

# pm-uninstall MongoDB

?

以上就是武林技術頻道小編為大家?guī)淼腸panm安裝及Perl模塊安裝教程,如果你想了解更多的信息,請繼續(xù)關注我們的網(wǎng)站吧!

發(fā)表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發(fā)表

圖片精選

主站蜘蛛池模板: 日韩精品免费在线视频 | 久久欧美精品一区 | 玖草在线视频 | 黑人巨大精品欧美一区二区小视频 | 国产亚洲欧美一区二区三区 | 欧美综合在线观看 | 日本午夜视频 | 欧美日韩视频网站 | 午夜社区 | 在线观看视频污 | 精品视频一区二区三区 | 日韩 国产 在线 | 一区二区免费在线观看 | 久久人操| a毛片| 成人在线一区二区 | 国产一级大片 | 欧美精品日韩 | 69久久99精品久久久久婷婷 | 国产高清在线精品一区二区三区 | 99精品视频一区二区三区 | a黄视频| 日日爱视频 | 神马久久久久久久久 | 国产一区二区黑人欧美xxxx | 亚洲一区二区三区免费在线 | 色呦呦 | 日韩一级免费 | 久久h| 成人精品 | 热久久这里只有精品 | 欧美激情视频一区二区三区在线播放 | 男女午夜网站 | 在线欧美成人 | 日韩视频在线观看一区二区 | 黄p网站在线观看 | 国产伦精品一区二区三区电影 | 亚洲日本国产 | 在线视频国产一区 | 自拍偷拍专区 | 久久久久久亚洲精品 |