简体   繁体   中英

command not found in zsh when it is there

I just installed the android SDK and was trying to run the emulator when this happened:

:: ~ » echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/home/neeraj/code/android/android-sdk-linux/tools:/home/neeraj/code/android/android-sdk-linux/platform-tools
:: ~ » whereis emulator
emulator: /home/neeraj/code/android/android-sdk-linux/tools/emulator
:: ~ » emulator
zsh: command not found: emulator

emulator seems to be in one of the $PATH directories, but zsh still says that it wasn't found. What could be the cause?

Try running rehash command, it helps in cases when some new software is installed. You can also try to run another shell instance (by executing zsh or logging out and in), this should also help.

Please also check file permissions to make sure you can read and execute that file.

Solved it. The problem was that emulator was a 32-bit ELF binary, and I didn't have the 32-bit runtime libraries installed. I installed the packages libc6:i386 , zlib1g:i386 , libstdc++6:i386 and lib32z1 as suggested in this answer , and that worked.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM