envsubst: command not found

Have You tried accessing the binary with the full path?

Maybe Your $PATH variable doesn't contain the default paths? echo $PATH should give something like:

[root@server ~]# echo $PATH
/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin

If it's empty, You may set the PATH variable with this command

export PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin"

On CentOS possible default full paths are:

/usr/bin/envsubst - from package: gettext

You may install the required package with command yum install {package}

On Debian possible default full paths are:

/usr/bin/envsubst - from package: gettext-base

You may install the required package with command apt-get install {package}
Error in other languages:
envsubst: bevel nie gevind nie
envsubst: comandă negăsită
envsubst: comando não encontrado
envsubst: commande introuvable
envsubst: command not found
envsubst: käsku ei ole
envsubst: không tìm thấy lệnh
envsubst: komanda nerasta
envsubst: Kommando nicht gefunden.
envsubst: kommandot finns inte
envsubst: komut yok
envsubst: nie znaleziono polecenia
envsubst: níor aimsíodh an t-ordú
envsubst: no se encontró la orden
envsubst: no s'ha trobat l'ordre
envsubst: opdracht niet gevonden
envsubst: parancs nem található
envsubst: perintah tidak ditemukan
envsubst: príkaz nenájdený
envsubst: příkaz nenalezen
envsubst: команда не найдена
envsubst: командата не е открита
envsubst: 命令找不到
envsubst: コマンドが見つかりません