LWP::Curl安装尝试连接到互联网



我的团队正在尝试安装LWP::Curl模块 AIX 服务器,并且面临问题。

我们正在使用 Perl v5.8.8 并尝试安装LWP::Curlv0.14。
我们已经在 AIX 服务器上成功安装了Curl v7.40

在安装LWP::Curl的过程中,似乎Curl.pm软件包正在尝试连接到互联网,但无法这样做。我们的 AIX 服务器未连接到因特网。

  • 这种连接是必要的吗?

  • 我们可以绕过此连接并仍然安装模块吗?

我已经发布了日志的摘录

*** 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 

如果我们选择"Y",则搜索互联网上的依赖项("cpan.org")

*** Installing Test::Exception...
CPAN: Storable loaded ok
Going to read /home/root/.cpan/Metadata
Warning: Found only 0 objects in /home/root/.cpan/Metadata
CPAN: LWP::UserAgent loaded ok
Fetching with LWP:
ftp://ftp.perl.org/pub/CPAN/authors/01mailrc.txt.gz
LWP failed with code[500] message[LWP::Protocol::MyFTP: Bad hostname 'ftp.perl.org']
Fetching with Net::FTP:
ftp://ftp.perl.org/pub/CPAN/authors/01mailrc.txt.gz
Issuing "/usr/bin/ftp -n"
ftp : Unknown host ftp.perl.org
Not connected.
Local directory now /home/root/.cpan/sources/authors
Not connected.
Not connected.
Not connected.
Not connected.
Not connected.
Not connected.
Bad luck... Still failed!
Can't access URL ftp://ftp.perl.org/pub/CPAN/authors/01mailrc.txt.gz.

我们的 AIX 服务器未连接到因特网。

我本以为很明显,如果没有连接到互联网,cpan就无法工作。您肯定不认为所有CPAN模块的所有源代码都存储在您的系统上吗?

但是如果你想在一个孤立的系统上安装随机的Perl模块,那么你将不得不这样做。我建议你看看CPAN::Mini.如果您将其安装在连接到互联网的机器上并使用它来构建 mirroe,那么您可以将镜像复制到您的离线系统并使用它来安装模块

另一种方法是手动下载模块的.tar.gz包文件(例如从LWP-Curl-0.14)将它们复制到 AIX 系统,然后使用perlmodinstall中所述的过程从那里安装

但请注意,以这种方式做事会消除cpan的许多便利性,特别是您必须建立任何缺少的依赖项(可能使用CPAN 依赖项站点)并以相同的方式下载和安装它们。您还必须更加小心地使模块保持最新状态,因为所有这些都必须手动完成

最新更新