in reply to Re^8: Unable to get any decrypted output from $gpg->verify
in thread Unable to get any decrypted output from $gpg->verify

Why would you need IT to install it on your PC? Just install Perl in your home directory and you can install all the CPAN modules you want. No root permissions required.

It's easy enough, just use Perlbrew

Generally, it's not a good idea to use the system perl for user tasks anyway (the same goes for python, nodejs, etc...), because then you and your system will be fighting over which module version is the "correct" version and you might break your system. Use a perl installation in your home directory.

PerlMonks XP is useless? Not anymore: XPD - Do more with your PerlMonks XP
  • Comment on Re^9: Unable to get any decrypted output from $gpg->verify

Replies are listed 'Best First'.
Re^10: Unable to get any decrypted output from $gpg->verify
by xuo (Acolyte) on Aug 24, 2023 at 18:46 UTC

    Hello.

    Understood. I've tried on my work PC but the module was not installed. And, I won't be allowed to install any <external> modules in my home directory. But I can try on my personal PC.

    Regards.

    Xuo.

      Hello,

      More and more difficult to make it work.

      Installing perlbrew was fine, installing cpanm was fine, installing Crypt::GPG failed.
      # cpanm Crypt::GPG ! ! Can't write to /usr/local/share/perl5/5.32 and /usr/local/bin: Insta +lling modules to /home/xuo/perl5 ! To turn off this warning, you have to do one of the following: ! - run me as a root or with --sudo option (to install to /usr/local +/share/perl5/5.32 and /usr/local/bin) ! - Configure local::lib in your existing shell to set PERL_MM_OPT e +tc. ! - Install local::lib by running the following commands ! ! cpanm --local-lib=~/perl5 local::lib && eval $(perl -I ~/per +l5/lib/perl5/ -Mlocal::lib) ! Crypt::GPG is up to date. (1.64)

      No it is not up to date as it is not installed into my home dir.

      So I've removed the module from my PC installation (/usr/share/perl5/vendor_perl/Crypt/GPG.pm). And I could find it locally.
      /home/xuo/perl5 152 # fn pm | grep -i gpg ./man/man3/Crypt::GPG.3pm ./lib/perl5/Crypt/GPG.pm

      OK.
      # perlbrew exec perl /mnt/Shared/debuggingPerlGpg.pl Can't locate Crypt/GPG.pm in @INC (you may need to install the Crypt:: +GPG module) (@INC contains: /home/xuo/perl5/perlbrew/perls/perl-5.36. +1/lib/site_perl/5.36.1/x86_64-linux /home/xuo/perl5/perlbrew/perls/pe +rl-5.36.1/lib/site_perl/5.36.1 /home/xuo/perl5/perlbrew/perls/perl-5. +36.1/lib/5.36.1/x86_64-linux /home/xuo/perl5/perlbrew/perls/perl-5.36 +.1/lib/5.36.1) at /mnt/Shared/debuggingPerlGpg.pl line 6. BEGIN failed--compilation aborted at /mnt/Shared/debuggingPerlGpg.pl l +ine 6. Command terminated with non-zero status. Command [perl /mnt/Shared/debuggingPerlGpg.pl] terminated with exit co +de 2 ($? = 512) under the following perl environment: Current perl: Name: perl-5.36.1 Path: /home/xuo/perl5/perlbrew/perls/perl-5.36.1/bin/perl Config: -de -Dprefix=/home/xuo/perl5/perlbrew/perls/perl-5.36.1 -Aev +al:scriptdir=/home/xuo/perl5/perlbrew/perls/perl-5.36.1/bin Compiled at: Aug 24 2023 20:51:38 perlbrew: version: 0.98 ENV: PERLBREW_ROOT: /home/xuo/perl5/perlbrew PERLBREW_HOME: /home/xuo/.perlbrew PERLBREW_PATH: /home/xuo/perl5/perlbrew/bin:/home/xuo/perl5/perlbr +ew/perls/perl-5.36.1/bin PERLBREW_MANPATH: /home/xuo/perl5/perlbrew/perls/perl-5.36.1/man

      Why you can't locate the module ?

      Adding these 2 lines under /home/xuo/perl5/perlbrew/etc/cshrc :

      setenv PERL5LIB /home/xuo/perl5/lib/perl5:/home/xuo/perl5/perlbrew/perls/perl-5.36.1/lib/site_perl/5.36.1/x86_64-linux:/home/xuo/perl5/perlbrew/perls/perl-5.36.1/lib/site_perl/5.36.1:/home/xuo/perl5/perlbrew/perls/perl-5.36.1/lib/5.36.1/x86_64-linux:/home/xuo/perl5/perlbrew/perls/perl-5.36.1/lib/5.36.1

      setenv PATH /home/xuo/perl5/perlbrew/perls/perl-5.36.1/bin:${PATH}
      perlbrew exec perl /mnt/Shared/debuggingPerlGpg.pl /home/xuo/perl5/perlbrew/bin/perlbrew: Perl lib version (5.36.1) doesn +'t match executable '/usr/bin/perl5.32.1' version (5.32.1) at /home/x +uo/perl5/perlbrew/perls/perl-5.36.1/lib/5.36.1/x86_64-linux/Config.pm + line 62. Compilation failed in require at /home/xuo/perl5/perlbrew/bin/perlbrew + line 4. BEGIN failed--compilation aborted at /home/xuo/perl5/perlbrew/bin/perl +brew line 4.

      I will not uninstall the main perl executable (/usr/bin/perl5.32.1) because perlbrew is using it instead of of the local one.

      So, thank you for your help to all but I'm tired fighting with this module.

      Regards.

      Xuo.