getopt: 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/getopt - from package: util-linux-ng

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

On Debian possible default full paths are:

/usr/bin/getopt - from package: util-linux

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