Solution to bash: XXX: command not found in centos
Recently, I want to build an Android project in centos. After jdk and Android sdk are configured, the environment variables of java and Android are configured in/etc/profile, however, you cannot directly use the android update project command in windows.
The following occurs: bash: android: command not found.
In this case, we can use the ln command to add android to the/usr/bin directory. The detailed solution is as follows:
1. Use cd/usr/bin to enter the Directory
2. Use the ln-s-f android sdk installation directory/tools/android command to link android to this directory.
3. Complete. Now we can use the android command in any directory.
Therefore, you can use bash: ant: command not found to solve the problem.
Finally, we attached the linux ln command Description: ln is another important command in linux. Its function is to create a synchronization link for a file in another location.
Syntax:
1. link a file to a file ln [-f |-n] [-s] SourceFile [TargetFile]
2. Link one or more files to a directory ln [-f |-n] [-s] SourceFile... TargetDirectory