cabal-tweak-flag: 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/cabal-tweak-flag - from package: ghc-rpm-macros

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