Reputation: 3707
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?
Upvotes: 0
Views: 1970
Reputation: 39158
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
Upvotes: 1