ldapcompare: 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/ldapcompare - from package: openldap-clients

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

On Debian possible default full paths are:

/usr/bin/ldapcompare - from package: ldap-utils

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