localserver.py: 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/R/site-library/nws/bin/localserver.py - from package: r-cran-nws

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