mtp-detect: 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/mtp-detect - from package: libmtp-examples

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

On Debian possible default full paths are:

/usr/bin/mtp-detect - from package: mtp-tools

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