【问题标题】:Fail to install perl CPAN modules on Solaris 10在 Solaris 10 上安装 perl CPAN 模块失败
【发布时间】:2012-02-22 08:04:36
【问题描述】:

我在 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

知道我错过了什么吗?

【问题讨论】:

  • 这可能对你有帮助stackoverflow.com/questions/3751656/…
  • 谢谢。但是经过它之后,我仍然无法真正弄清楚解决方案。这是否意味着我必须手动编译模块及其依赖项?

标签: perl solaris-10


【解决方案1】:

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

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

$ cpan
cpan> look Socket
Socket$ perl Makefile.PL LIBS=-lresolv ; make ; make test
Socket$ sudo make install

【讨论】:

  • 我认为应该是LIBS=-lresolv而不是LIBS=-lresolve
  • 已修复错字,谢谢。获得更多声誉,然后您可以自己编辑内容。 :)
猜你喜欢
  • 2013-11-22
  • 1970-01-01
  • 2021-03-08
  • 2018-06-19
  • 2013-11-04
  • 1970-01-01
  • 2012-05-04
  • 2017-07-19
  • 2015-09-16
相关资源
最近更新 更多