无法在 Solaris 10 上安装 perl CPAN 模块

发布于 2025-01-07 17:56:29 字数 1054 浏览 1 评论 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

知道我错过了什么吗?

I run on Solaris 10.

I downloaded and install perl from sunfreeware.

When I try to execute CPAN command, I got following error.

# 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 doesn't seem to have problem

# 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

Any idea what am I missing?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

第几種人 2025-01-14 17:56:29

为了避免手动重新编译所有内容,请使用 配置 CPAN make_arg ="http://p3rl.org/ExtUtils%3a%3aMakeMaker#LIBS" rel="nofollow">LIBS=-lresolvmbuild_arg--config libs=-lresolv 。 (这会为所有 Perl 发行版编译运行全局添加库。)然后发出 CPAN recompile< /a> 命令。我没有测试过这个。首先在备用系统上进行实验,如果出现问题,能够恢复 Perl 树。

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

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

To avoid manual recompilation of everything, configure CPAN make_arg with LIBS=-lresolv and mbuild_arg with --config libs=-lresolv. (This adds the library globally for all Perl distro compile runs.) Then issue the CPAN recompile command. I have not tested this. Experiment on a spare system first, be able to restore the Perl tree if something goes wrong.

If you suppose only the Socket distro needs the extra libs parameter, then it is best to recompile this one manually:

$ cpan
cpan> look Socket
Socket$ perl Makefile.PL LIBS=-lresolv ; make ; make test
Socket$ sudo make install
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文