appstream-index: 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/bin/appstream-index - from package: appstream-index

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