Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

I'm trying to install the Signature module for strawberry perl in order to sign an executable using pp. When I try to install the module, I get an error message that it couldn't auto-detect a signature utility on my system and then gives me three options:

1) Manually install GnuPG. (I installed gpg4win, but it doesn't detect it I guess)

2) Automatically install Crypt::OpenPGP (but it fails when it tries to do this)

3) Forget about signature stuff...

Do I have to do something with gpg4win now that it's installed on my machine?

Replies are listed 'Best First'.
Re: Installing Module::Signature
by davido (Cardinal) on Jun 04, 2013 at 16:54 UTC

    Crypt::OpenPGP has several things that could be blocking a successful install. One is that it relies directly upon Crypt::IDEA, Crypt::DES, and Crypt::Blowfish, each of which are incompatible with Perl 5.18. If you're using Perl 5.18, I recommend manually installing the "unauthorized release" versions of those modules that I've uploaded. I've been in touch with the author of those modules, and he committed to getting a new release uploaded within 48 hours (that was a couple weeks ago, ;).

    The other issue is that Crypt::OpenPGP relies on Crypt::RSA, which depends on Crypt::Random, which has a dependency on Math::Pari. So you'll need to ensure that the PARI/GP library, including dev headers is installed on your system. Some Linux distributions may already have dpkg or aptitude libraries built for PARI/GP, in which case you should be able to install them and get going. I don't know about PARI/GP distributions for Windows though.

    Dana Jacobsen created a module called Alt::Crypt::RSA::BigInt which provides an alternate implementation of Crypt::RSA that eliminates the PARI/GP dependency by using Bytes::Random::Secure and Math::BigInt rather than Crypt::Random and Math::Pari. If you install Alt::Crypt::RSA::BigInt, and then try to install Crypt::OpenPGP, you should meet with success. Take heed to the tips in the documentation for Alt::Crypt::RSA::BigInt that will help where performance is an issue.

    So to summarize:

    • If you're using Perl 5.18, install the "unauthorized release" versions of Crypt::DES, Crypt::IDEA, and Crypt::Blowfish (at least until the author of those modules fixes them).
    • If you don't have PARI/GP, install it, and install Math::Pari.
    • If you can't install PARI/GP and Math::Pari, install Alt::Crypt::RSA.
    • Then re-try installing Crypt::OpenPGP

    Dave

      Thanks Dave. I'm having issues installing those "unauthorized releases". I'm able to unpack them and run the makefile script, but nmake doesn't work. I placed the nmake.exe file from my visual basic install folder into the directory that I unpacked everything, but I get "NMAKE: Fatal error U1077" with perl.exe and it stops.

        Just let cpanm do it for you: cpanm path-to-download-distribution-tarball. Figuring out how to install App::cpanminus (and modules in general) is a different topic, and one that is well documented, and easy to find given a little effort searching. ;)


        Dave