Skip Menu |

This queue is for tickets about the Net-SSH-Perl CPAN distribution.

Report information
The Basics
Id: 11674
Status: resolved
Priority: 0/
Queue: Net-SSH-Perl

People
Owner: Nobody in particular
Requestors: osenbach [...] us.ibm.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 1.27
Fixed in: (no value)



Subject: Can't locate object method "blocking" via package "IO::Handle"
I'm having some problems with your Perl SSH module. I keep receiving the following error: [root@wecmserver2 coreit]# perl test.pl Can't locate object method "blocking" via package "IO::Handle" at /usr/local/ActivePerl-5.8/lib/site_perl/5.8.6/Net/SSH/Perl.pm line 212, <GEN0> line 1. BEGIN failed--compilation aborted at test.pl line 5. I've attempted to reinstall the Net::SSH:Perl module with both Perl 5.8.3 and Perl 5.8.6 with the "perl -MCPAN -e 'install Net::SSH::Perl'" command and manually, but did not have any success. Also, I performed an extensive search online, but I didn't find anything useful. The script I'm attempting to execute is very simple to test the functionality: #!/usr/local/ActivePerl-5.8/bin/perl use Net::SSH::Perl my $ssh = Net::SSH::Perl->new("nistnet2.rtp.raleigh.ibm.com"); $ssh->login("root","wecm4ibm"); $output1 = $ssh->cmd("crontab -l"); $output2 = $ssh->cmd("la -al"); print "Output1: $output1\n"; print "Output2: $output2\n"; Any help would be greatly appreciated... --------------------------------------------------------------- [root@wecmserver2 root]# perl -v This is perl, v5.8.3 built for i386-linux-thread-multi Copyright 1987-2003, Larry Wall Perl may be copied only under the terms of either the Artistic License or the GNU General Public License, which may be found in the Perl 5 source kit. Complete documentation for Perl, including FAQ lists, should be found on this system using `man perl' or `perldoc perl'. If you have access to the Internet, point your browser at http://www.perl.com/, the Perl Home Page. [root@wecmserver2 root]# ------------------------------------------------------------------------ [root@wecmserver2 root]# uname -a Linux wecmserver2 2.6.10-1.14_FC2smp #1 SMP Thu Feb 10 17:32:40 EST 2005 i686 i6 86 i386 GNU/Linux
any luck on this problem? Thanks! junie junieloise@yahoo.com [guest - Sun Feb 27 05:45:52 2005]: Show quoted text
> I'm having some problems with your Perl SSH module. I keep receiving > the following error: > > [root@wecmserver2 coreit]# perl test.pl > Can't locate object method "blocking" via package "IO::Handle" at > /usr/local/ActivePerl-5.8/lib/site_perl/5.8.6/Net/SSH/Perl.pm line > 212, <GEN0> line 1. > BEGIN failed--compilation aborted at test.pl line 5. > > > I've attempted to reinstall the Net::SSH:Perl module with both Perl > 5.8.3 and Perl 5.8.6 with the "perl -MCPAN -e 'install > Net::SSH::Perl'" command and manually, but did not have any > success. Also, I performed an extensive search online, but I > didn't find anything useful. > > The script I'm attempting to execute is very simple to test the > functionality: > > #!/usr/local/ActivePerl-5.8/bin/perl > > use Net::SSH::Perl > > my $ssh = Net::SSH::Perl->new("nistnet2.rtp.raleigh.ibm.com"); > $ssh->login("root","wecm4ibm"); > > $output1 = $ssh->cmd("crontab -l"); > $output2 = $ssh->cmd("la -al"); > > print "Output1: $output1\n"; > print "Output2: $output2\n"; > > Any help would be greatly appreciated... > > > --------------------------------------------------------------- > > [root@wecmserver2 root]# perl -v > > This is perl, v5.8.3 built for i386-linux-thread-multi > > Copyright 1987-2003, Larry Wall > > Perl may be copied only under the terms of either the Artistic
License Show quoted text
> or the > GNU General Public License, which may be found in the Perl 5 source > kit. > > Complete documentation for Perl, including FAQ lists, should be found > on > this system using `man perl' or `perldoc perl'. If you have access
to Show quoted text
> the > Internet, point your browser at http://www.perl.com/, the Perl Home > Page. > > [root@wecmserver2 root]# > > > ---------------------------------------------------------------------
--- Show quoted text
> > [root@wecmserver2 root]# uname -a > Linux wecmserver2 2.6.10-1.14_FC2smp #1 SMP Thu Feb 10 17:32:40 EST > 2005 i686 i6 > 86 i386 GNU/Linux
From: lfine [...] google.com
[guest - Sun Feb 27 05:45:52 2005]: I would like to echo this same problem. Red Hat 9, Perl 5.8.0, i386. -- Larry Show quoted text
> I'm having some problems with your Perl SSH module. I keep receiving > the following error: > > [root@wecmserver2 coreit]# perl test.pl > Can't locate object method "blocking" via package "IO::Handle" at > /usr/local/ActivePerl-5.8/lib/site_perl/5.8.6/Net/SSH/Perl.pm line > 212, <GEN0> line 1. > BEGIN failed--compilation aborted at test.pl line 5. > > > I've attempted to reinstall the Net::SSH:Perl module with both Perl > 5.8.3 and Perl 5.8.6 with the "perl -MCPAN -e 'install > Net::SSH::Perl'" command and manually, but did not have any > success. Also, I performed an extensive search online, but I > didn't find anything useful. > > The script I'm attempting to execute is very simple to test the > functionality: > > #!/usr/local/ActivePerl-5.8/bin/perl > > use Net::SSH::Perl > > my $ssh = Net::SSH::Perl->new("nistnet2.rtp.raleigh.ibm.com"); > $ssh->login("root","wecm4ibm"); > > $output1 = $ssh->cmd("crontab -l"); > $output2 = $ssh->cmd("la -al"); > > print "Output1: $output1\n"; > print "Output2: $output2\n"; > > Any help would be greatly appreciated... > > > --------------------------------------------------------------- > > [root@wecmserver2 root]# perl -v > > This is perl, v5.8.3 built for i386-linux-thread-multi > > Copyright 1987-2003, Larry Wall > > Perl may be copied only under the terms of either the Artistic License > or the > GNU General Public License, which may be found in the Perl 5 source > kit. > > Complete documentation for Perl, including FAQ lists, should be found > on > this system using `man perl' or `perldoc perl'. If you have access to > the > Internet, point your browser at http://www.perl.com/, the Perl Home > Page. > > [root@wecmserver2 root]# > > > ------------------------------------------------------------------------ > > [root@wecmserver2 root]# uname -a > Linux wecmserver2 2.6.10-1.14_FC2smp #1 SMP Thu Feb 10 17:32:40 EST > 2005 i686 i6 > 86 i386 GNU/Linux
From: Adrian Lazar
I'm having the same problem: hb3@apollo:eg$ pssh apollo -p 2222 Can't locate object method "blocking" via package "IO::Handle" at /usr/local/lib/perl5/site_perl/5.8.6/Net/SSH/Perl.pm line 212, <GEN0> line 1. If I comment out line 212 I get the following error: hb3@apollo:eg$ pssh apollo -p 2222 Undefined subroutine &main::ReadMode called at ./pssh line 53, <GEN0> line 1. I'm running: Slackware 9.0 2.4.20 Perl 5.8.6 Net::SSH::Perl 1.27 IO::Handle (The one that came with Perl 5.8.6) Any help on this? Thanks, Adrian
From: cubes [...] ghosthacked.net
Howdy, I believe I've found a fix for this. You need to modify the Net::SSH::Perl module to explicitly use IO::Socket; You can add this line manually by editing: [your perl library path]/Net/SSH/Perl.pm On OS X 10.4.1 the path is: /Library/Perl/5.8.6/Net/SSH/Perl.pm Alternatively, you can grab the Net::SSH::Perl tarball and apply the following patch (apologies if rt mangles this by adding linebreaks, escaping html entities, etc., etc.): Cut Here 8<-----8<------8<-----8<-----8<------ Cut Here diff -Naur Net-SSH-Perl-1.27/lib/Net/SSH/Perl.pm Net-SSH-Perl-1.27.patched/lib/Net/SSH/ Perl.pm --- Net-SSH-Perl-1.27/lib/Net/SSH/Perl.pm 2005-02-04 22:33:19.000000000 -0800 +++ Net-SSH-Perl-1.27.patched/lib/Net/SSH/Perl.pm 2005-05-17 19:17:40.000000000 -0700 @@ -13,6 +13,7 @@ use vars qw( $VERSION $CONFIG $HOSTNAME ); $CONFIG = {}; +use IO::Socket; use Socket; use Fcntl; use Symbol; Cut Here 8<-----8<------8<-----8<-----8<------ Cut Here To do this, save the patch to a file, say, net-ssh-perl-bug-11674-fix.patch, then grab the Net::SSH::Perl tarball, untar it somewhere, place your net-ssh-perl-bug-11675-fix.patch file in the same directory where you untarred the Net::SSH::Perl distribution, and invoke: patch -p0 < net-ssh-perl-bug-11674-fix.patch Cheers. (Dan) [guest - Sun Feb 27 05:45:52 2005]: Show quoted text
> I'm having some problems with your Perl SSH module. I keep receiving > the following error: > > [root@wecmserver2 coreit]# perl test.pl > Can't locate object method "blocking" via package "IO::Handle" at > /usr/local/ActivePerl-5.8/lib/site_perl/5.8.6/Net/SSH/Perl.pm line > 212, <GEN0> line 1. > BEGIN failed--compilation aborted at test.pl line 5. > > > I've attempted to reinstall the Net::SSH:Perl module with both Perl > 5.8.3 and Perl 5.8.6 with the "perl -MCPAN -e 'install > Net::SSH::Perl'" command and manually, but did not have any > success. Also, I performed an extensive search online, but I > didn't find anything useful. > > The script I'm attempting to execute is very simple to test the > functionality: > > #!/usr/local/ActivePerl-5.8/bin/perl > > use Net::SSH::Perl > > my $ssh = Net::SSH::Perl->new("nistnet2.rtp.raleigh.ibm.com"); > $ssh->login("root","wecm4ibm"); > > $output1 = $ssh->cmd("crontab -l"); > $output2 = $ssh->cmd("la -al"); > > print "Output1: $output1\n"; > print "Output2: $output2\n"; > > Any help would be greatly appreciated... > > > --------------------------------------------------------------- > > [root@wecmserver2 root]# perl -v > > This is perl, v5.8.3 built for i386-linux-thread-multi > > Copyright 1987-2003, Larry Wall > > Perl may be copied only under the terms of either the Artistic License > or the > GNU General Public License, which may be found in the Perl 5 source > kit. > > Complete documentation for Perl, including FAQ lists, should be found > on > this system using `man perl' or `perldoc perl'. If you have access to > the > Internet, point your browser at http://www.perl.com/, the Perl Home > Page. > > [root@wecmserver2 root]# > > > ------------------------------------------------------------------------ > > [root@wecmserver2 root]# uname -a > Linux wecmserver2 2.6.10-1.14_FC2smp #1 SMP Thu Feb 10 17:32:40 EST > 2005 i686 i6 > 86 i386 GNU/Linux
From: FReid
On Tue May 17 22:36:52 2005, guest wrote: Show quoted text
> Howdy, > > I believe I've found a fix for this. You need to modify the > Net::SSH::Perl module to explicitly > > use IO::Socket; >
This line made it into Net-SSH-Perl-1.28 but was removed again from Net-SSH-Perl-1.29 I believe this is a regression, and a mistake, as I have had the error above using 1.29, which was fixed by readding this line. Could you fix this again in 1.30? Thanks