0

Can't update my path in git bash, I followed the guide by Mikaël Mayer in this post Git Bash doesn't see my PATH

Still no luck, $PATH is not updated and i can't run an executable file inside ndk-bundle

$ PATH=$PATH:/c/Users/Karlo/AppData/Local/Android/sdk/ndk-bundle

$PATH bash:/c/Users/Karlo/bin:/mingw64/bin:/usr/local/bin:/usr/bin:/bin:/mingw64/bin:/usr/bin:/c/Users/Karlo/bin:/c/ProgramData/Oracle/Java/javapath:/c/Program: No such file or directory
Marcin Orlowski
  • 72,056
  • 11
  • 123
  • 141
shinta
  • 189
  • 2
  • 16

1 Answers1

1

You are missing export

Try

$ export PATH=/c/Users/Karlo/AppData/Local/Android/sdk/ndk-bundle:$PATH

EDIT

For example:

chin@SGNPC0FTMSP12 MINGW64 ~
$ echo $PATH
/c/users/chin/devs/tools/ant/apache-ant-1.9.9/bin:/opt/subversion/bin:/c/users/chin/jdk1.7.0_79/bin:/c/Users/chin/bin:/mingw64/bin:/usr/local/bin:/usr/bin:/bin:/mingw64/bin:/usr/bin:/c/Users/chin/bin:/c/ProgramData/Oracle/Java/javapath:/c/WINDOWS/system32:/c/WINDOWS:/c/WINDOWS/System32/Wbem:/c/WINDOWS/System32/WindowsPowerShell/v1.0:/c/Program Files/1E/NomadBranch:/c/ProgramData/Oracle/Java/javapath:/c/WINDOWS/system32:/c/WINDOWS:/c/WINDOWS/System32/Wbem:/c/WINDOWS/System32/WindowsPowerShell/v1.0:/c/Program Files/1E/NomadBranch:/cmd:/usr/bin/vendor_perl:/usr/bin/core_perl:/c/users/chin/jdk1.7.0_79/bin:/c/users/chin/devs/tools/maven/apache-maven-3.5.0/bin

chin@SGNPC0FTMSP12 MINGW64 ~
$ export PATH=/c/users/chin/devs/tools/ant/apache-ant-1.9.9/bin2:$PATH

chin@SGNPC0FTMSP12 MINGW64 ~
$ echo $PATH
/c/users/chin/devs/tools/ant/apache-ant-1.9.9/bin2:/c/users/chin/devs/tools/ant/apache-ant-1.9.9/bin:/opt/subversion/bin:/c/users/chin/jdk1.7.0_79/bin:/c/Users/chin/bin:/mingw64/bin:/usr/local/bin:/usr/bin:/bin:/mingw64/bin:/usr/bin:/c/Users/chin/bin:/c/ProgramData/Oracle/Java/javapath:/c/WINDOWS/system32:/c/WINDOWS:/c/WINDOWS/System32/Wbem:/c/WINDOWS/System32/WindowsPowerShell/v1.0:/c/Program Files/1E/NomadBranch:/c/ProgramData/Oracle/Java/javapath:/c/WINDOWS/system32:/c/WINDOWS:/c/WINDOWS/System32/Wbem:/c/WINDOWS/System32/WindowsPowerShell/v1.0:/c/Program Files/1E/NomadBranch:/cmd:/usr/bin/vendor_perl:/usr/bin/core_perl:/c/users/chin/jdk1.7.0_79/bin:/c/users/chin/devs/tools/maven/apache-maven-3.5.0/bin
Oh Chin Boon
  • 23,028
  • 51
  • 143
  • 215
  • Are the executables directly under `/c/Users/Karlo/AppData/Local/Android/sdk/ndk-bundle`? e.g. `/c/Users/Karlo/AppData/Local/Android/sdk/ndk-bundle/binary`, if they are not, then you may need to update the export accordingly, e.g. `$ export PATH=/c/Users/Karlo/AppData/Local/Android/sdk/ndk-bundle/bin:$PATH` – Oh Chin Boon Aug 11 '17 at 09:25
  • Updates to variables already in the environment are `export`ed automatically. If you run `export testVar=one` and then `testVar=two`, and run `env` to look at environment variables, you'll see that `testVar` has the value `two`. – Charles Duffy Nov 15 '17 at 17:46