4

我刚刚安装WWW:Mechanize::Firefox,但是当我尝试创建这个“类”的实例时:

    my $mech = WWW::Mechanize::Firefox->new();

我收到此错误:

Failed to connect to , problem connecting to "localhost", port 4242: 
No connection could be made because the target machine 
actively refused it. 
at C:/strawberry/perl/site/lib/MozRepl/Client.pm line 144

有人可以帮忙吗?

4

2 回答 2

7

您必须安装mozrepl并在菜单中启动它Tools → MozRepl → Start

于 2011-09-14T15:28:33.993 回答
2

除了安装和启动 firefox/mozrepl 之外,主动拒绝的连接通常是防火墙的工作,因此您需要学习使用本地防火墙以允许 mozrepl 侦听来自 localhost 的连接

于 2011-09-15T07:00:23.573 回答