perl Makefile.PL

perl Makefile.PL

我花了几个小时,但无法安装 CPAN Crypt::OpenSSL::RSA 模块。它是 Postfix 的 dkimproxy 附加组件所必需的。

我所做的是在 shell 中运行以下命令:

$ perl -MCPAN -e 'install Crypt::OpenSSL::RSA'

当我运行此命令时,会显示几行,最后显示以下内容:

Checking if your kit is complete...
Looks good
Warning: prerequisite Crypt::OpenSSL::Random 0 not found.
Writing Makefile for Crypt::OpenSSL::RSA
---- Unsatisfied dependencies detected during [I/IR/IROBERTS/Crypt-OpenSSL-RSA-0.26.tar.gz] -----
    Crypt::OpenSSL::Random
Shall I follow them and prepend them to the queue
of modules we are processing right now? [yes] 

然后我按下回车键(是),结果出现了几十行错误。最后我得到了这个:

...
...
RSA.xs:579: warning: implicit declaration of function ‘RSA_sign’
RSA.xs:579: error: ‘rsaData’ has no member named ‘hashMode’
RSA.xs:579: error: ‘rsaData’ has no member named ‘hashMode’
RSA.xs:579: error: ‘rsaData’ has no member named ‘rsa’
RSA.xs: In function ‘XS_Crypt__OpenSSL__RSA_verify’:
RSA.xs:605: error: ‘rsaData’ has no member named ‘rsa’
RSA.xs:610: error: ‘rsaData’ has no member named ‘hashMode’
RSA.xs:611: warning: implicit declaration of function ‘RSA_verify’
RSA.xs:611: error: ‘rsaData’ has no member named ‘hashMode’
RSA.xs:613: error: ‘rsaData’ has no member named ‘hashMode’
RSA.xs:616: error: ‘rsaData’ has no member named ‘rsa’
RSA.xs:619: warning: implicit declaration of function ‘ERR_peek_error’
RSA.xs: In function ‘boot_Crypt__OpenSSL__RSA’:
RSA.xs:214: warning: implicit declaration of function ‘ERR_load_crypto_strings’
make: *** [RSA.o] Error 1
  /usr/bin/make  -- NOT OK
Running make test
  Can't test without successful make
Running make install
  make had returned bad status, install seems impossible

我做错了什么?请指导我。谢谢。

答案1

我自己在 CentOS 5.4 上遇到了这个问题,我没有安装 openssl-devel!因此运行:

yum install openssl-devel

帮我修好了

或者如果你使用的是基于 Debian 的系统:

sudo apt-get install libssl-dev

答案2

奇怪的是,我在 Debian Squeeze 上安装了类似的软件,但这个模块总是失败。

perl Makefile.PL

警告:未找到先决条件 Crypt::OpenSSL::Random 0。为 Crypt::OpenSSL::RSA 编写 Makefile

..但我找不到您提到的确切软件包。ii libcrypt-openssl-bignum-perl 0.04-2 访问 OpenSSL 多精度整数运算库 ii libcrypt-openssl-dsa-perl 0.13-4 实现 DSA 签名验证系统的模块 ii libcrypt-openssl-rsa-perl 0.25-1+b1 提供基本 RSA 功能的 Perl 模块 ii libcrypt-openssl-x509-perl 1.4-1 OpenSSL X509 API 的 Perl 扩展

答案3

你在某个地方缺少一个头文件。在输出中你发布的内容上方,你应该看到对缺少的 .h 文件的引用。找出哪个包提供了该特定头文件,你就离成功更近了一步。反复操作...冲洗...重复,最终它会编译的 :)

答案4

是的,这也解决了我在 Debian 机器上遇到的问题。

运行 Aptitude,然后搜索“openssl”并看到 lib-openssl 包,并安装它。

重新运行 CPAN,安装 Crypt::OpenSSL::RSA 并且一切顺利。

相关内容