I am trying to install IO::Socket::Timeout (as part of a requirement for Redis, on 5.14, on Linux as root).
I have tried in both CPAN and CPANM, when I enter the command
cpan IO::Socket::Timeout
It comes up with the error
t/timeout.t ............... ops Address already in use at /root/.cpan/build/IO-Socket-Timeout-0.32-ZVMh0b/t/tlib/TestTimeout.pm line 31.
cannot open port: 50420 at /opt/perl/lib/site_perl/5.14.2/Test/TCP.pm line 51.
# Child (test with no delays and no timeouts) exited without calling finalize()
t/timeout.t ............... 1/?
# Failed test 'test with no delays and no timeouts'
If I do
netstat -lntu | grep 50420
netstat -ntp | grep 50420
It doesn't show any port in use.
If I look at the timeout.t test that seems to be calling, it's
my $socket = IO::Socket::INET->new(
Listen => 5,
Reuse => 1,
Blocking => 1,
LocalPort => $port
) or die "ops $!";
If I download the gzip from cpan and try to install with
Perl Makefile.PL && make && make test
and I add some debug to display which port its trying, it tries different ports, eg
50341 or 50809 etc which aren't in use either
Any ideas what the problem may be, or how I can isolate ?