Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/perl/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/78.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Perl 将服务器升级到SLES 11 SP3后,SSH2在创建新对象时挂起_Perl_Sles - Fatal编程技术网

Perl 将服务器升级到SLES 11 SP3后,SSH2在创建新对象时挂起

Perl 将服务器升级到SLES 11 SP3后,SSH2在创建新对象时挂起,perl,sles,Perl,Sles,我的软件在SUSE Enterprise Linux 11 SP2上运行良好,但我必须升级到SP3。升级我的Net::SSH2后,基于Perl的模块只是挂起,没有给出任何错误,甚至没有超时。因此,我用Net::SSH2创建了一个简单的测试脚本,它在SP2机器上成功运行,但在SP3机器上没有。这是测试脚本 #!/usr/bin/perl use strict; use warnings; use Net::SSH2; my ($host, $user, $password) = ("myhos

我的软件在SUSE Enterprise Linux 11 SP2上运行良好,但我必须升级到SP3。升级我的Net::SSH2后,基于Perl的模块只是挂起,没有给出任何错误,甚至没有超时。因此,我用Net::SSH2创建了一个简单的测试脚本,它在SP2机器上成功运行,但在SP3机器上没有。这是测试脚本

#!/usr/bin/perl
use strict;
use warnings;

use Net::SSH2;

my ($host, $user, $password) = ("myhost", "myuser", "mypassword");

print "Before Net::SSH2-new()\n";
my $ssh = Net::SSH2->new();

print "Before ssh->Connect\n";
$ssh->connect($host);

print "Before ssh->auth_keyboard\n";
$ssh->auth_keyboard($user, $password);

print "Before ssh->Channel\n";
my $channel = $ssh->channel();

print "Before Channel->blocking(0)\n";    
$channel->blocking(0);

print "Before Channel->exec\n";    
my $rt = $channel->exec("hostname");
print "The return value is: $rt \n";

#Closing connection
$channel->close;
$ssh->disconnect;
在SP3服务器中,我得到如下输出

myuser@myhost:~> perl  test_ssh  
Before Net::SSH2-new()

然后什么也没有。但在SP2服务器中,它可以正常工作。有人能告诉你是什么导致了这个问题吗?

你能访问SP2和SP3上的机器吗?你能在两者上运行以下两个命令并共享输出吗
perl-V | head-1和
perl-e'使用Net::SSH2;比如说$Net::SSH2::VERSION。“\n”
我刚刚查看了SLES 11 SP3的发行说明。显然,它包含了对openssh的更新。由于Net::SSH2是一个XS模块,您可能需要重新编译它。Net::SSH2有缺陷,而下面的libssh2甚至有更多的缺陷。无论如何,您是如何安装libssh2的?和Net::SSH2?SLES不保证版本之间的二进制兼容性,因此您编译的任何东西(即不是rpm)都可能会在新的库版本上发生碰撞。