error: gpg required but not found! - SpamAssassin

This is a discussion on error: gpg required but not found! - SpamAssassin ; I have sa-update running from cron every Sunday and on one of my machines I get the output: error: gpg required but not found! I don't understand why I'm getting this. The script says it ouputs this when it can't ...

+ Reply to Thread
Results 1 to 4 of 4

Thread: error: gpg required but not found!

  1. error: gpg required but not found!

    I have sa-update running from cron every Sunday and on one of my
    machines I get the output:

    error: gpg required but not found!

    I don't understand why I'm getting this. The script says it ouputs
    this when it can't find the gpg executable but it is there:

    /usr/local/bin/gpg

    Just like on all my other machines. I'm thinking
    Mail::SpamAssassin::Util::find_executable_in_env_p ath is not working
    correctly. The pertinent excerpt is:

    my $GPGPath;
    if ($GPG_ENABLED || $opt{'import'}) {
    # find GPG in the PATH
    # bug 4958: for *NIX it's "gpg", in Windows it's "gpg.exe"
    $GPGPath = 'gpg' . $Config{_exe};
    dbg("gpg: Searching for '$GPGPath'");

    if ($GPGPath =
    Mail::SpamAssassin::Util::find_executable_in_env_p ath($GPGPath)) {
    dbg("gpg: found $GPGPath");

    # bug 5030: if GPGPath has a space, put it in quotes
    if ($GPGPath =~ / /) {
    $GPGPath =~ s/"/\\"/g;
    $GPGPath = qq/"$GPGPath"/;
    dbg("gpg: path changed to $GPGPath");
    }
    }
    else {
    die "error: gpg required but not found!\n";
    }

    When I run the script at the command line I don't get any output.

    Any ideas?

    /juan


  2. Re: error: gpg required but not found!

    On Tue, 2008-09-02 at 09:30 -0400, Juan Miscaro wrote:
    > I have sa-update running from cron every Sunday and on one of my

    ^^^^
    > machines I get the output:
    >
    > error: gpg required but not found!
    >
    > I don't understand why I'm getting this. The script says it ouputs
    > this when it can't find the gpg executable but it is there:
    >
    > /usr/local/bin/gpg

    ^^^^^^^^^^^^^^

    > When I run the script at the command line I don't get any output.

    ^^^^^^^^^^^^^^^^^^^
    > Any ideas?


    Cron does not use the same $PATH as your interactive shell. You'd need
    to set the $PATH variable in your crontab to contain that path.

    guenther


    --
    char *t="\10pse\0r\0dtu\0.@ghno\x4e\xc8\x79\xf4\xab\x51\x8a \x10\xf4\xf4\xc4";
    main(){ char h,m=h=*t++,*x=t+2*h,c,i,l=*x,s=0; for (i=0;i (c=*++x); c&128 && (s+=h); if (!(h>>=1)||!t[s+h]){ putchar(t[s]);h=m;s=0; }}}


  3. Re: error: gpg required but not found!

    error: gpg required but not found!

    /usr/local/bin/gpg

    As someone else noted, cron typically has a restricted path.
    I have

    PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/pkg/bin/

    at the beginning of crontab so that sa-update will find /usr/pkg/bin/gpg

    I think it would be better if sa-update found gpg at configure time and
    substituted in the path - I'd like to patch sa-update (in pkgsrc) to
    work without /usr/pkg/bin in the path, but it seemed non-obvious how to
    do that. Perhaps just replace all the searching with

    $GPGPath = "/usr/pkg/bin/gpg";


  4. Re: error: gpg required but not found!

    2008/9/2 Karsten Br├Ąckelmann :
    > On Tue, 2008-09-02 at 09:30 -0400, Juan Miscaro wrote:
    >> I have sa-update running from cron every Sunday and on one of my

    > ^^^^
    >> machines I get the output:
    >>
    >> error: gpg required but not found!
    >>
    >> I don't understand why I'm getting this. The script says it ouputs
    >> this when it can't find the gpg executable but it is there:
    >>
    >> /usr/local/bin/gpg

    > ^^^^^^^^^^^^^^
    >
    >> When I run the script at the command line I don't get any output.

    > ^^^^^^^^^^^^^^^^^^^
    >> Any ideas?

    >
    > Cron does not use the same $PATH as your interactive shell. You'd need
    > to set the $PATH variable in your crontab to contain that path.


    Thank you.

+ Reply to Thread