sloccount: 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/sloccount - from package: sloccount

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

On Debian possible default full paths are:

/usr/bin/sloccount - from package: sloccount

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