【问题标题】:error installing perl module Net::SSH::Perl安装 perl 模块 Net::SSH::Perl 时出错
【发布时间】:2020-08-07 23:50:39
【问题描述】:

强调文本在使用perl -MCPAN -e "install Net::SSH::Perl" 安装 perl 模块“Net::SSH::Perl”时,仅Result:PASS 未显示任何错误,但使用cpan -D Net::SSH::Perl 显示未安装。安装不上是什么原因。

【问题讨论】:

  • 我尝试在 Ubuntu 20.04、perl 5.30 和 cpanm Net::SSH::Perl 上安装 Net::SSH::Perl,但安装依赖项 Crypt::Curve25519 失败(我正在调查)
  • 另见this问题
  • 你可以使用cpan Net::SSH::Perl来安装模块。

标签: perl cpan


【解决方案1】:

像这样修补依赖模块Crypt::Curve25519后,我能够安装该模块。

首先创建一个补丁Crypt-Curve25519-0.06-missing-version.patch

diff --git a/lib/Crypt/Curve25519.pm b/lib/Crypt/Curve25519.pm
index 686b706..d9c2b3d 100644
--- a/lib/Crypt/Curve25519.pm
+++ b/lib/Crypt/Curve25519.pm
@@ -1,4 +1,5 @@
 package Crypt::Curve25519;
+our $VERSION = 0.06;
 #ABSTRACT: Generate shared secret using elliptic-curve Diffie-Hellman function

 use strict;

然后,运行:

wget https://www.cpan.org/authors/id/S/SR/SREZIC/patches/Crypt-Curve25519-0.06-PR10-ANOTHERLINK.patch
git clone git@github.com:ajgb/crypt-curve25519.git
cd crypt-curve25519
git apply ../Crypt-Curve25519-0.06-missing-version.patch
git apply ../Crypt-Curve25519-0.06-PR10-ANOTHERLINK.patch
perl Makefile.PL
make  # No errors now
make test
make install
cpanm Net::SSH::Perl

【讨论】:

  • 我正在尝试为仅连接到一台特定机器的 Docker 容器构建它。这个模块是真的需要还是有办法跳过这个依赖并让它仍然“工作”。例如,如果我连接的主机不以任何方式使用curve25519。
猜你喜欢
  • 2017-06-08
  • 2012-07-04
  • 1970-01-01
  • 2014-02-18
  • 1970-01-01
  • 2011-10-10
  • 2014-09-30
  • 2011-03-29
  • 2016-05-04
相关资源
最近更新 更多