4

I spent several hours but unable to install CPAN Crypt::OpenSSL::RSA module. It's required for Postfix's dkimproxy add-on.

What I do is to run the following command in the shell:

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

When I run this command, several lines are displayed and at the end, this is displayed:

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] 

Then I hit enter (yes) and tens of lines generated with error. At the end I get this:

...
...
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

What am I doing wrong? Please guide me. Thanks.

Tommiie
  • 5,547
  • 2
  • 11
  • 45
Willy
  • 215
  • 1
  • 5
  • 9

6 Answers6

9

Just came across this problem myself on CentOS 5.4 I didn't have openssl-devel installed! So running:

yum install openssl-devel

fixed it for me

Or if you're on something debian-based:

sudo apt-get install libssl-dev

rm-vanda
  • 247
  • 7
  • 18
  • Ubuntu 16.04 Note: The Ubuntu Spamassassin apt depo pkg did not install MAIL::DKIM, (and 2-3 others). Well, DKIM depends on Crypt::OpenSSL:: - and this was not installed via apt either. Crypt::SSL::* depends on the libssl-dev repo packge you mention. Package maintainers should have done this, though. Anyway, thank you for your answer ! – B. Shea Mar 25 '17 at 14:39
2

Odd, I have similar installed on Debian Squeeze, and this module always fails.

perl Makefile.PL

Warning: prerequisite Crypt::OpenSSL::Random 0 not found. Writing Makefile for Crypt::OpenSSL::RSA

..but I cannot find the exact package you refer to. ii libcrypt-openssl-bignum-perl 0.04-2 Access OpenSSL multiprecision integer arithmetic libraries ii libcrypt-openssl-dsa-perl 0.13-4 module which implements the DSA signature verification system ii libcrypt-openssl-rsa-perl 0.25-1+b1 Perl module providing basic RSA functionality ii libcrypt-openssl-x509-perl 1.4-1 Perl extension to OpenSSL's X509 API

noe
  • 21
  • 1
1

You're missing a header somewhere. Above what you posted in the output you should see a reference to a missing .h file. Figure out what package provides that particular header and you're one step closer. Lather...Rinse...Repeat, eventually it will compile :)

d34dh0r53
  • 1,671
  • 11
  • 11
  • Looking more at your post you should probably install Crypt::OpenSSL::Random and try again. – d34dh0r53 Jan 28 '10 at 23:21
  • Hi, thanks for your reply. It seems that Crypt::OpenSSL::Random is causing the problem. Whenever I try to install this module with perl -MCPAN -e 'install Crypt::OpenSSL::Random' it generates errors I have pasted above. Any ideas? I am unable to install dkimproxy for this reason :(((( – Willy Jan 30 '10 at 16:46
  • Paste the full output of the installation of Crypt::OpenSSL::Random. – d34dh0r53 Feb 01 '10 at 22:01
0

I've run into this problem so many times it's not even funny. Always fixed with:

sudo apt-get install libnet-ssleay-perl
sudo apt-get install libcrypt-ssleay-perl
sudo apt-get install libio-socket-ssl-perl

You actually may only need 1, or in my case, sometimes you need all. Just depends on how proficient you are with your perl. Crypt, Openssl, Net::Twitter::Lite are a couple of things that have triggered the issue in the past.

Ron

0

Yup, that fixed my problem too on a Debian box.

Ran Aptitude, and then did a search for "openssl" and saw the lib-openssl package, and installed it.

Re-ran CPAN, did the install Crypt::OpenSSL::RSA and everything went smoothly.

hangy
  • 143
  • 1
  • 6
0

Fixed my problem too for Ubuntu, but needed libengine-tpm-openssl.

Ran again:

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

and it went ok.

Mr Ed
  • 111
  • 2