Hello!
On Thu, Jul 26, 2012 at 5:56 AM, huangfxbupt wrote:
> hi agentzh,
> 请教一个非常基础的问题,没用过perl,在安装test-nginx遇到问题。
> 安装环境是内网,无法访问cpan.org,需要的几个能从cpan下载的模块已经下载并装上了,还是会强制需要访问cpan.org,错误信息如下:
>
> *** Installing dependencies...
>
> *** Your host cannot resolve the domain name 'cpan.org', which
> probably means the Internet connections are unavailable.
> ==> Should we try to install the required module(s) anyway? [n] y
> [ERROR] Fetching of 'ftp://ftp.cpan.org/pub/CPAN/authors/01mailrc.txt.gz'
> failed: Command failed:
>
> 请问如何离线安装呢?问题比较弱,多谢解答~
>
你需要安装 Makefile.PL 文件中列出的所有依赖项:
https://github.com/agentzh/test-nginx/blob/master/Makefile.PL
推荐的做法是为 cpan 安装程序设置代理,然后通过 cpan 命令安装之:
sudo cpan Test::Nginx
第一次运行 cpan 会提示进行配置。如果没有,则可以无参数形式启动 cpan 工具,然后在 cpan 提示符上输入命令
o conf init /proxy/
比如:
cpan[4]> o conf init /proxy/
然后它便会提示你配置 ftp_proxy, http_proxy 等等。配置完后记得再输入 o conf commit 将你的配置写入磁盘。
Best regards,
-agentzh
P.S. 同时抄送给 openresty 邮件列表:https://groups.google.com/group/openresty
也欢迎你订阅之,并在那里交流。