primes: 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 Debian possible default full paths are:

/usr/lib/plan9/bin/primes - from package: 9base
/usr/bin/primes - from package: libmath-prime-util-perl

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