Background:
Last night, the installation of node through brew, the result of my terminal in addition to the CD and LS, the other commands are not used, the Internet search a lot of results, no one can correctly solve my problem, record it.
Turn on the terminal to display:
-bash:touch:command not found
First of all:
In the terminal input: Export path= "/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/x11/bin" This sentence means to temporarily let the command, followed by: hurriedly use OPEN-E ~/.bash_profile Open the. bash_profile file in a text editor: finally: Add the following to the file:
Export java_home='/usr/libexec/java_home '
Export path=${path}:${java_home}:${android_sdk_root}:${android_sdk_root}/platform-tools:${ Android_sdk_root}/tools:${java_home}:${java_home}/binexport path="/usr/local/bin:/usr/local/sbin:~/ Bin:$PATH "
Save the file and exit, the last: Do not close the terminal, Source-e ~/.bash_profile make the file effective, shut down the terminal again, restart again, will not appear-bash:touch:command not found similar problems appear! Summary: Last night, after encountering problems, stay up to three points to solve, and then did not sleep well, your sister Ah, unexpectedly did not sleep well, big early 6:30 up and toss, start the Mac only less than one months, pit a lot. Take it slow. Reference blog: http://blog.sina.com.cn/s/blog_4b55f6860101h3bb.html http://blog.csdn.net/cike110120/article/details/50408095
How to successfully solve the MAC command under no circumstances