LoginSignup
18
7

More than 5 years have passed since last update.

Macでのenvsubstの利用について

Posted at

概要

Macでenvsubstコマンドを利用しようとしたら、
コマンドが無いと言われて使えなかったので調べた内容をメモする。

envsubstコマンド

Macでコマンドを実行してみるとエラーになりました。

ターミナル
$ envsubst --version
-bash: envsubst: command not found

$ gettext --version
-bash: gettext: command not found

インストールされていないかと思い、インストールを実行してみる

ターミナル
$ brew install gettext
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/core).
No changes to formulae.

Warning: gettext 0.19.8.1 is already installed

既にインストール済みとのことですが、コマンドは見つからないというエラーは改善せず。
下記参考サイトを参考に、brew link コマンドを実行してみる。

ターミナル
$ brew link --force gettext 
Linking /usr/local/Cellar/gettext/0.19.8.1... 185 symlinks created

If you need to have this software first in your PATH instead consider running:
  echo 'export PATH="/usr/local/opt/gettext/bin:$PATH"' >> ~/.bash_profile

パスが通ったようで、コマンドが使えるようになった。

ターミナル
$ which gettext
/usr/local/bin/gettext

$ which envsubst
/usr/local/bin/envsubst

以上

参考サイト

18
7
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
18
7