Linux添加Additional Perl modules

摘要:編譯postgresql時,增加--enable-tap-tests ,啓用Perl TAP工具進行測試。出現

需要安裝 IPC::Run, Test::More,Time::HiRes。

cpan -i IPC::Run

cpan -i Test::More

cpan -i Time::HiRes

checking for perl module IPC::Run... no
checking for perl module Test::More 0.87... no
checking for perl module Time::HiRes... no
configure: error: Additional Perl modules are required to run TAP tests

1.  yum -y install perl perl-devel

2. 以root運行:

#perl -MCPAN -e shell

 

3. 重載CPAN。

cpan[4]>reload CPAN

4. 列出所有CPAN模塊。

cpan[5]>m

 5. 安裝 

cpan[6]>install Net::SMTP

 or

cpan -i Net::SMTP

添加的站點

http://search.cpan.org/mirror

6. 退出

cpan[7]>quit

[root@localhost postgresql-11.5]# perl -MCPAN -e 'shell'

CPAN.pm requires configuration, but most of it can be done automatically.
If you answer 'no' below, you will enter an interactive dialog for each
configuration option instead.

Would you like to configure as much as possible automatically? [yes] yes

 <install_help>

Warning: You do not have write permission for Perl library directories.

To install modules, you need to configure a local Perl library directory or
escalate your privileges.  CPAN can help you by bootstrapping the local::lib
module or by configuring itself to use 'sudo' (if available).  You may also
resolve this problem manually if you need to customize your setup.

What approach do you want?  (Choose 'local::lib', 'sudo' or 'manual')
 [local::lib] install  CPAN


Warning: You do not have write permission for Perl library directories.

To install modules, you need to configure a local Perl library directory or
escalate your privileges.  CPAN can help you by bootstrapping the local::lib
module or by configuring itself to use 'sudo' (if available).  You may also
resolve this problem manually if you need to customize your setup.

What approach do you want?  (Choose 'local::lib', 'sudo' or 'manual')
 [local::lib] manual

Autoconfigured everything but 'urllist'.

Now you need to choose your CPAN mirror sites.  You can let me
pick mirrors for you, you can select them from a list or you
can enter them by hand.

Would you like me to automatically choose some CPAN mirror
sites for you? (This means connecting to the Internet) [yes] yes
Trying to fetch a mirror list from the Internet
Fetching with LWP:
http://www.perl.org/CPAN/MIRRORED.BY
Fetching with LWP:
http://www.perl.org/CPAN/MIRRORED.BY.gz
Fetching with LWP:
ftp://ftp.perl.org/pub/CPAN/MIRRORED.BY
Fetching with LWP:
ftp://ftp.perl.org/pub/CPAN/MIRRORED.BY.gz
Fetching with Net::FTP:
ftp://ftp.perl.org/pub/CPAN/MIRRORED.BY

Looking for CPAN mirrors near you (please be patient)
.................... done!

New urllist
  http://cpan.mirror.constant.com/
  http://cpan.mirrors.ionfish.org/

Autoconfiguration complete.

commit: wrote '/root/.cpan/CPAN/MyConfig.pm'

You can re-run configuration any time with 'o conf init' in the CPAN shell
Terminal does not support AddHistory.

cpan shell -- CPAN exploration and modules installation (v1.9800)
Enter 'h' for help.

cpan[1]> install Net::SMTP

 

更多資料:

https://www.cnblogs.com/xianguang/p/9845375.html

https://suse.com/c/how-add-additional-perl-modules-your-linux-installation/

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章