The command could not be located because '/usr/bin' is not included
2012-09-07 18:03
866 查看
用的是Ubuntu12.04。
为了把adb命令设置到环境变量中,我在~/.bashrc文件中加入了如下命令:
export PATH=/home/develop/android-sdks/platform-tools/
结果悲剧了.输入常用命令ls,cd ,,,都不行。连vi也不行。一律报错。The command could not be located because '/usr/bin' is not included in the PATH environment variable.clear: command not found.
看半天才知道忘加系统PATH的路径,所以系统工具命令都找不到。
可怎么把配置文件改过来呢,折腾了半天,发现很简单。直接用系统工具的全路径编辑配置文件。我用的是sudo vi /usr/bin/vi ~/.bashrc.
然后加入命令 export PATH=/home/develop/android-sdks/platform-tools/:$PATH。再重启终端就好了。
学到了两点:
1.系统命令找不到时,通常是路径不对,直接在命令行用全路径即可;
2.在设置环境变量时,尤其是linux系统中,你加入自己的环境变量,可还要附带上之前的变量。如最后加上:$PATH
为了把adb命令设置到环境变量中,我在~/.bashrc文件中加入了如下命令:
export PATH=/home/develop/android-sdks/platform-tools/
结果悲剧了.输入常用命令ls,cd ,,,都不行。连vi也不行。一律报错。The command could not be located because '/usr/bin' is not included in the PATH environment variable.clear: command not found.
看半天才知道忘加系统PATH的路径,所以系统工具命令都找不到。
可怎么把配置文件改过来呢,折腾了半天,发现很简单。直接用系统工具的全路径编辑配置文件。我用的是sudo vi /usr/bin/vi ~/.bashrc.
然后加入命令 export PATH=/home/develop/android-sdks/platform-tools/:$PATH。再重启终端就好了。
学到了两点:
1.系统命令找不到时,通常是路径不对,直接在命令行用全路径即可;
2.在设置环境变量时,尤其是linux系统中,你加入自己的环境变量,可还要附带上之前的变量。如最后加上:$PATH
相关文章推荐
- the command could not be located because '/bin' is not included in the path environment variable
- The command could not be located because '/sbin' is not included in the PATH environment variable
- Could not execute auto check for display colors using command /usr/bin/xdpyinfo. Check if the DISPLA
- 阿里云 esc 云服务器无缘无故的一次/usr/bin 目录丢失导致整个服务无法启动 # ./shutdown.sh ./shutdown.sh: line 41: dirname:command not found cannot find /catalina.sh the find /catalina.sh The file is absent or does not have execute
- Could not execute auto check for display colors using command /usr/bin/xdpyinfo. Check if the DISPLA
- Could not execute auto check for display colors using command /usr/bin/xdpyinfo. Check if the DISPLA
- Solution For "could not be located or a different control is assigned to the same ID after postback"
- Spring Boot中使用Feign调用时Hystrix提示异常:"could not be queued for execution and no fallback available."以及"Rejected command because thread-pool queueSize is at rejection threshold"
- Exclusive access could not be obtained because the database is in use
- 启动unity3d 提示“unity3d EditorWindow could not be loaded because the script is not found in the projec”
- TroubleShooting The virtual machine could not be started because the hypervisor is not running
- [Solved]: System.Data.SqlClient.SqlError: Exclusive access could not be obtained because the database is in use.
- Ubuntu16.04.4 The command could not be located
- fix errors 1088: “Failed to execute request because the App-Domain could not be created. Error: 0x80070005 Access is denied” and 1334: “Exception: System.IO.FileLoadException”
- SqlServer2005 恢复数据库时出现Exclusive access could not be obtained because the database is in use 的解决方法
- >>> Could not execute auto check for display colors using command /usr/bin/xdpyinfo. Check if the DI
- Logstash could not be started because there is already another instance using the configured data di
- The virtual machine could not be started because the hypervisor is not running
- (转)Could not execute auto check for display colors using command /usr/bin/xdpyinfo. Check if the DISPL
- SqlServer2005 恢复数据库时出现Exclusive access could not be obtained because the database is in use 的解决方法