This question about Configuration: Answered

Error: '/bin/grep' was not found on the current PATH


I have tried to install Foswiki 1.0.8 on an AIX 5.3 server running apache.

The install seems to have a gone fine and I've run through the configuration but I'm still getting two errors and nothing displays when I go to http://<dnsaddress>/wiki/bin/view/System/WebHome (i renamed foswiki to wiki).

I have set the wiki to use RCSLite but the two errors I get are to do with {RCS}{EgrepCmd} and {RCS}{FgrepCmd}. They both say "Error: '/bin/grep' was not found on the current PATH"

Now grep is installed as part of AIX in /usr/bin/ as is egrep and fgrep. The PATH variable set in the security setup section of the configuration contains /bin:/usr/bin and plenty of other locations on my server.

I've tried all the different combinations in the {RCS}{EgrepCmd} and {RCS}{FgrepCmd} boxes such as /usr/bin/grep and just grep without a path but everytime it comes up with the same error.

Is someone able to tell me if AIX grep is not "GNU-compatible" hence the error? Or am I doing something wrong regarding the setup?

Any help/advice would be much appreciated!

Thanks very much,

Instead of scanning the PATH to find grep, I assume for performance reasons, you must set the full path manually in {RCS}{EgrepCmd} and {FgrepCmd}.

I was successfully able to do the following on my Linux system:
  • mv /bin/grep /usr/bin/grep
  • confirm errors you observed in configure
  • update {RCS}{EgrepCmd} and {FgrepCmd} to point at /usr/bin/grep instead of /bin/grep
  • no more configure errors
  • access wiki successfully
The code that checks for presence of the grep command lives at lib/Foswiki/Configure/ in the method checkGnuProgram, which does this:

`$prog --version 2>&1`

I'm not an expert on these matters but it appears Foswiki assumes GNU binaries.

-- PaulHarvey - 15 Jan 2010


Thanks for the quick response, but I'm still having a problem.

I've got grep in /usr/bin/ (its always been there) but its still coming back with the error. The question I've got is whether AIX grep is compatible with Foswiki code. I guess if a 'grep --version' doesn't give the correct version information then I've got a problem...

-- AlexLindley - 16 Jan 2010

It has been suggested to try the AIX open source packages to get a GNU version of grep and friends, if possible:,Sat&sel=131#l127

-- PaulHarvey - 16 Jan 2010

Thanks Paul, really appreciate the help.

I'll try and give this a go on Monday.

-- AlexLindley - 16 Jan 2010

Silence suggests success. Closing.

-- CrawfordCurrie - 13 Jul 2010

QuestionForm edit

Subject Configuration
Version Foswiki 1.0.8
Status Answered
Topic revision: r7 - 13 Jul 2010, CrawfordCurrie - This page was cached on 14 Nov 2018 - 07:12.

The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy