0

我在Solaris 10上运行。

我从sunfreeware下载并安装了perl

当我尝试执行 CPAN 命令时,出现以下错误。

# perl -MCPAN -e shell
Now you need to choose your CPAN mirror sites.  You can let me
pick mirrors for you, you can select them from a list or you
can enter them by hand.

Would you like me to automatically choose the best CPAN mirror
sites for you? (This means connecting to the Internet and could
take a couple minutes) [yes]

Trying to fetch a mirror list from the Internet
  LWP not available
  LWP not available
Fetching with Net::FTP:
ftp://ftp.perl.org/pub/CPAN/MIRRORED.BY
ld.so.1: perl: fatal: relocation error: file /usr/local/lib/perl5/5.12.3/i86pc-solaris/auto/Socket/Socket.so: symbol inet_aton: referenced symbol not found
Killed
#

ldd好像没有问题

# ldd /usr/local/lib/perl5/5.12.3/i86pc-solaris/auto/Socket/Socket.so
        libc.so.1 =>     /lib/libc.so.1
        libm.so.2 =>     /lib/libm.so.2

知道我错过了什么吗?

4

1 回答 1

1

为避免手动重新编译所有内容,请使用和配置CPAN 。(这会为所有 Perl 发行版编译运行全局添加库。)然后发出 CPAN命令。我没有测试过这个。首先在备用系统上进行实验,如果出现问题,能够恢复 Perl 树。make_argLIBS=-lresolvmbuild_arg--config libs=-lresolvrecompile

如果你认为只有 Socket 发行版需要额外的 libs 参数,那么最好手动重新编译这个:

$ cpan
cpan> look Socket
Socket$ perl Makefile.PL LIBS=-lresolv ; make ; make test
Socket$ sudo make install
于 2012-02-22T10:14:08.593 回答