简体   繁体   English

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

[英]Fail to install perl CPAN modules on Solaris 10

I run on Solaris 10 . 我在Solaris 10上运行。

I downloaded and install perl from sunfreeware . 我从sunfreeware下载并安装了perl

When I try to execute CPAN command, I got following error. 当我尝试执行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 doesn't seem to have problem 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

Any idea what am I missing? 知道我想念什么吗?

To avoid manual recompilation of everything, configure CPAN make_arg with LIBS=-lresolv and mbuild_arg with --config libs=-lresolv . 为了避免一切的手动重新编译, 配置CPAN make_argLIBS=-lresolvmbuild_arg--config libs=-lresolv (This adds the library globally for all Perl distro compile runs.) Then issue the CPAN recompile command. (这将为所有Perl Distro编译运行全局添加库。)然后发出CPAN recompile命令。 I have not tested this. 我还没有测试。 Experiment on a spare system first, be able to restore the Perl tree if something goes wrong. 首先在备用系统上进行实验,如果出现问题,可以还原Perl树。

If you suppose only the Socket distro needs the extra libs parameter, then it is best to recompile this one manually: 如果您假设只有Socket发行版需要额外的libs参数,那么最好手动重新编译该代码:

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM