標籤:perl cpan ubuntu
Ubuntu下安裝Perl的擴充包很是簡單,只需要簡單的步驟就可以了。
sudo cpancpan> install Bundle::CPANPLUS::Dependenciescpan> install Bundle::CPANPLUS
整個過程需要些時間。當安裝完畢,接下來就可以使用cpan命令來安裝擴充包了,如要安裝Text::Autoformat擴充包,
cpan[3]> install Text::AutoformatReading ‘/home/richard/.cpan/Metadata‘ Database was generated on Tue, 05 May 2015 10:41:02 GMTRunning install for module ‘Text::Autoformat‘Running make for N/NE/NEILB/Text-Autoformat-1.71.tar.gzFetching with LWP:http://mirror.as24220.net/pub/cpan/authors/id/N/NE/NEILB/Text-Autoformat-1.71.tar.gzFetching with LWP:http://mirror.as24220.net/pub/cpan/authors/id/N/NE/NEILB/CHECKSUMSChecksum for /home/richard/.cpan/sources/authors/id/N/NE/NEILB/Text-Autoformat-1.71.tar.gz okScanning cache /home/richard/.cpan/build for sizes............................................................................DONE CPAN.pm: Building N/NE/NEILB/Text-Autoformat-1.71.tar.gzChecking prerequisites... requires: ! Text::Reform is not installedERRORS/WARNINGS FOUND IN PREREQUISITES. You may wish to install the versionsof the modules indicated above before proceeding with this installationCreated MYMETA.yml and MYMETA.jsonCreating new ‘Build‘ script for ‘Text-Autoformat‘ version ‘1.71‘---- Unsatisfied dependencies detected during -------- NEILB/Text-Autoformat-1.71.tar.gz ---- Text::Reform [requires]Running Build test Delayed until after prerequisitesRunning Build install Delayed until after prerequisitesRunning install for module ‘Text::Reform‘Running make for C/CH/CHORNY/Text-Reform-1.20.tar.gzFetching with LWP:http://mirror.as24220.net/pub/cpan/authors/id/C/CH/CHORNY/Text-Reform-1.20.tar.gzFetching with LWP:http://mirror.as24220.net/pub/cpan/authors/id/C/CH/CHORNY/CHECKSUMSChecksum for /home/richard/.cpan/sources/authors/id/C/CH/CHORNY/Text-Reform-1.20.tar.gz ok CPAN.pm: Building C/CH/CHORNY/Text-Reform-1.20.tar.gzCreated MYMETA.yml and MYMETA.jsonCreating new ‘Build‘ script for ‘Text-Reform‘ version ‘1.20‘Building Text-Reform CHORNY/Text-Reform-1.20.tar.gz ./Build -- OKRunning Build testt/00.load.t .. 1/1 # Testing Text::Reform 1.20t/00.load.t .. ok t/pod.t ...... skipped: Test::Pod 1.14 required for testing PODt/reform.t ... ok All tests successful.Files=3, Tests=67, 0 wallclock secs ( 0.04 usr 0.01 sys + 0.08 cusr 0.03 csys = 0.16 CPU)Result: PASS CHORNY/Text-Reform-1.20.tar.gz ./Build test -- OKRunning Build installBuilding Text-ReformInstalling /usr/local/share/perl/5.18.2/Text/Reform.pmInstalling /usr/local/man/man3/Text::Reform.3pm CHORNY/Text-Reform-1.20.tar.gz sudo ./Build install -- OKRunning Build for N/NE/NEILB/Text-Autoformat-1.71.tar.gz Has already been unwrapped into directory /home/richard/.cpan/build/Text-Autoformat-1.71-u0bs8b CPAN.pm: Building N/NE/NEILB/Text-Autoformat-1.71.tar.gzBuilding Text-Autoformat NEILB/Text-Autoformat-1.71.tar.gz ./Build -- OKRunning Build testt/00.load.t .......... 1/1 # Testing Text::Autoformat 1.71t/00.load.t .......... ok t/01.ignore.t ........ ok t/02.wide-numbers.t .. ok All tests successful.Files=3, Tests=4, 0 wallclock secs ( 0.04 usr 0.00 sys + 0.13 cusr 0.04 csys = 0.21 CPU)Result: PASS NEILB/Text-Autoformat-1.71.tar.gz ./Build test -- OKRunning Build installBuilding Text-AutoformatInstalling /usr/local/share/perl/5.18.2/Text/Autoformat.pmInstalling /usr/local/man/man3/Text::Autoformat.3pm NEILB/Text-Autoformat-1.71.tar.gz sudo ./Build install -- OK
本文出自 “天道酬勤” 部落格,請務必保留此出處http://lavenliu.blog.51cto.com/5060944/1642267
Ubuntu安裝CPAN上的擴充包for Perl