Linux 如何更新 CPAN perl 模块
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/19677296/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to update CPAN perl module
提问by MENTAL
I'm trying to install some perl module but everytime this message is shown
我正在尝试安装一些 perl 模块,但每次显示此消息时
New CPAN.pm version (v2.00) available.
[Currently running version is v1.960001]
You might want to try
install CPAN
reload cpan
to both upgrade CPAN.pm and run the new version without leaving
the current session.
I've tried to do
我试过做
install CPAN
reload cpan
With
和
pi@raspbmc:~$ sudo perl -MCPAN -e shell
Terminal does not support AddHistory.
cpan shell -- CPAN exploration and modules installation (v1.960001)
Enter 'h' for help.
cpan[1]> install CPAN
But the result is
但结果是
Going to read '/root/.cpan/sources/authors/01mailrc.txt.gz'
............................................................................DONE
Going to read '/root/.cpan/sources/modules/02packages.details.txt.gz'
Database was generated on Mon, 28 Oct 2013 23:41:06 GMT
HTTP::Date not available
..............
New CPAN.pm version (v2.00) available.
[Currently running version is v1.960001]
You might want to try
install CPAN
reload cpan
to both upgrade CPAN.pm and run the new version without leaving
the current session.
...............pi@raspbmc:~$
The version is still 1.960001.
版本还是1.960001。
采纳答案by Vorsprung
download CPAN module from this page http://metacpan.org/pod/CPAN
untar it (
tar zxf CPAN-2.00.tar.gz
), cd into the directory and runperl Makefile.PL make test sudo make install
从这个页面下载 CPAN 模块http://metacpan.org/pod/CPAN
解压它 (
tar zxf CPAN-2.00.tar.gz
), cd 进入目录并运行perl Makefile.PL make test sudo make install
edit: if it breaks making a path with :: in it then perhaps your filesystem type does not support these characters in a filename
编辑:如果它破坏了用 :: 在其中创建路径,那么您的文件系统类型可能不支持文件名中的这些字符
To see the filesystem type, run mount
without any parameters and all the mounted filesystems with their types will be shown
要查看文件系统类型,mount
不带任何参数运行,将显示所有已挂载的文件系统及其类型
The error Can't write-open blib/man3/CPAN::Admin.3pm
seems to suggest a filesystem problem, but ext4 in rw mode sounds alright. Try this from the CPAN-2.00
directory
该错误Can't write-open blib/man3/CPAN::Admin.3pm
似乎表明存在文件系统问题,但 rw 模式下的 ext4 听起来不错。从CPAN-2.00
目录中试试这个
perl -e 'open($f,">blib/man3/CPAN::thisisatest") || die $!;'
回答by honzakuzel1989
The following procedure
以下程序
kuz1@banana:~$ sudo perl -MCPAN -e shell
cpan[1]> install CPAN
cpan[2]> reload cpan
kuz1@banana:~$ sudo perl -MCPAN -e shell
cpan[1]> install CPAN
cpan[2]> reload cpan
works for me on the BANANA Pi Single-Board Computer with Ubuntu 14.04.
在装有 Ubuntu 14.04 的 BANANA Pi 单板计算机上为我工作。