+ -
当前位置:首页 → 问答吧 → 缺少perl的Net::FTP 模块,要安装那个ports?

缺少perl的Net::FTP 模块,要安装那个ports?

时间:2003-11-21

来源:互联网

FREE# perl tmp
Can't locate Net/FTP.pm in @INC (@INC contains: /usr/local/lib/perl5/site_perl/5.005/i386-freebsd /usr/local/lib/perl5/site_perl/5.005 . /usr/libdata/perl/5.00503/mach /usr/libdata/perl/5.00503) at tmp line 2.
BEGIN failed--compilation aborted at tmp line 2.

FREE# cat -n tmp
1 #!/usr/bin/perl -w
2 use Net::FTP;
3 use constant HOST => 'ftp.perl.org';
4 use constant DIR => '/pub/CPAN';
5 use constant FILE => 'RECENT';
6
7 my $ftp=Net::FTP->new(HOST) or die "count not connect :$@\n";
8 $ftp->login('anonymous') or die $ftp->message;
9 $ftp->cwd(DIR) or die $ftp->message;
10 $ftp->get(FILE) or die $ftp->message;
11 $ftp->quit;
12 warn "File retriened successfully.\n";

看上去是缺Net::FTP哦~~~

作者: home   发布时间: 2003-11-21

安装一次perl 5试试!

呵呵, 我也不太清楚!

作者: rainren   发布时间: 2003-11-21

现在是version 5.005_03 built
现在正装5.8

作者: home   发布时间: 2003-11-21

first of all, you need perl5 installed in your system, and then, to install other packages, please use command:
perl -MCPAN -e shell

for example:
[root@linux1 cards]# perl -MCPAN -e shell

cpan shell -- CPAN exploration and modules installation (v1.61)
ReadLine support available (try 'install Bundle::CPAN')

cpan> install Net::FTP
CPAN: Storable loaded ok
Going to read /root/.cpan/Metadata
Database was generated on Fri, 20 Jun 2003 03:43:48 GMT
CPAN: LWP::UserAgent loaded ok
Fetching with LWP:
ftp://sunsite.cnlab-switch.ch/mirror...1mailrc.txt.gz
Going to read /root/.cpan/sources/authors/01mailrc.txt.gz
Fetching with LWP:
ftp://sunsite.cnlab-switch.ch/mirror...details.txt.gz
Going to read /root/.cpan/sources/modules/02packages.details.txt.gz
Database was generated on Thu, 13 Nov 2003 22:47:11 GMT

There's a new CPAN.pm version (v1.76) available!
[Current version is v1.61]
You might want to try
install Bundle::CPAN
reload cpan
without quitting the current session. It should be a seamless upgrade
while we are running...

Fetching with LWP:
ftp://sunsite.cnlab-switch.ch/mirror...odlist.data.gz
Going to read /root/.cpan/sources/modules/03modlist.data.gz



FTP.pm is just a plain text file, and it's an object from package Net, please do read perl before to start anything...

作者: werix   发布时间: 2003-11-21

谢谢~~~现在能正常使用了。有个help看帮助。。。。

作者: home   发布时间: 2003-11-21

又有不懂得了。。
make world 后,输入perl -MCPAN -e shell 后,又要重新来一次了。
到了选择国家那里,有几个选项,我选了其中一个,怎么不行:ask :ask:ask

Now we need to know where your favorite CPAN sites are located. Push
a few sites onto the array (just in case the first on the array won't
work). If you are mirroring CPAN to your local workstation, specify a
file: URL.

First, pick a nearby continent and country (you can pick several of
each, separated by spaces, or none if you just want to keep your
existing selections). Then, you will be presented with a list of URLs
of CPAN mirrors in the countries you selected, along with previously
selected URLs. Select some of those URLs, or just keep the old list.
Finally, you will be prompted for any extra URLs -- file:, ftp:, or
http: -- that host a CPAN mirror.

(1) Africa
(2) Asia
(3) Central America
(4) Europe
(5) North America
(6) Oceania
(7) South America
Select your continent (or several nearby continents) [] 1

(1) South Africa
Select your country (or several nearby countries) [] 2
invalid items entered, try again
Select your country (or several nearby countries) [] china
invalid items entered, try again
Select your country (or several nearby countries) [] 3
invalid items entered, try again
Select your country (or several nearby countries) [] y
invalid items entered, try again
Select your country (or several nearby countries) [] yes
invalid items entered, try again
Select your country (or several nearby countries) []
我怎么才能通过:ask :ask
可能我这个问题太莱了。但我真的不懂。。。

作者: home   发布时间: 2003-11-23

2) Asia

应该选这个!

作者: rianren   发布时间: 2003-11-23

不是吧,

这几个英文单词都不认识啊,嘿嘿...............

作者: noooooooooooooo   发布时间: 2003-11-23

引用:
最初由 noooooooooooooo 发表
不是吧,

这几个英文单词都不认识啊,嘿嘿...............
笑什么笑,就是不懂。。

作者: home   发布时间: 2003-11-23

呵呵, 慢慢来, 看多了就认识了, 我现在都只是认识一些单词却不知怎么读!

作者: rianren   发布时间: 2003-11-23

引用:
最初由 rianren 发表
呵呵, 慢慢来, 看多了就认识了, 我现在都只是认识一些单词却不知怎么读!
大家都是开玩笑的,请原谅。。。

请上上楼和上楼不要误会

作者: home   发布时间: 2003-11-23

看你,连亚洲都不认识唉,

真得好好学学了,多看看英文的站点,虽然很难,习惯了就好了拉,

加油了拉,

作者: noooooooooooooo   发布时间: 2003-11-23