bashshellterminalshcommand-line-interface

envsubst: command not found on Mac OS X 10.8


When I try to run a script that contains the envsubst command, I get this error. Looking online, this seems to be a standard bash command, so I am not sure what to install in order to get it to work.


Solution

  • Edit: @cobberboy 's anwer is more correct. upvote him.

    brew install gettext
    brew link --force gettext 
    

    Following is my old answer:

    envsubst is included in gettext package.

    Therefore you may compile it by your own, using standard build tools such as make or using homebrew.

    However, it seems to have little issue when installing gettext in MacOS. See following url for details: How to install gettext on MacOS X