您的位置:首页 > 运维架构 > Shell

solution to bash error (because of the PATH)

2010-03-11 12:33 316 查看
由于修改了/etc/bash.bashrc时,将PATH变量中路径设置错误(路径拼写错误,呵呵,低级错误),所以当再次打开bash时,出现

Command 'lesspipe' is available in '/usr/bin/lesspipe'

The command could not be located because '/usr/bin' is not included in the PATH environment variable.

bash: lesspipe: command not found

Command 'dircolors' is available in '/usr/bin/dircolors'

The command could not be located because '/usr/bin' is not included in the PATH environment variable.

bash: dircolors: command not found

Command 'uname' is available in '/bin/uname'

The command could not be located because '/bin' is not included in the PATH environment variable.

bash: uname: command not found

Command 'uname' is available in '/bin/uname'

The command could not be located because '/bin' is not included in the PATH environment variable.

bash: uname: command not found

bash: [: !=: unary operator expected

bash: [: too many arguments

bash: [: too many arguments

bash: [: =: unary operator expected

bash: [: too many arguments

bash: [: too many arguments

bash: [: too many arguments

bash: [: too many arguments

bash: [: too many arguments

bash: [: too many arguments

bash: [: =: unary operator expected

bash: [: =: unary operator expected

bash: [: =: unary operator expected

bash: [: =: unary operator expected

bash: [: =: unary operator expected

bash: [: =: unary operator expected

bash: [: =: unary operator expected

bash: [: =: unary operator expected

bash: [: =: unary operator expected

bash: [: =: unary operator expected

bash: [: too many arguments

bash: [: =: unary operator expected

Command 'sed' is available in '/bin/sed'

The command could not be located because '/bin' is not included in the PATH environment variable.

bash: sed: command not found

xuqiang@ubuntu:~$



下面解决方案:

首先成为超级用户(ubuntu)

/usr/bin/sudo -i(必须是绝对路径)

/usr/bin/nano /etc/bash.bashrc



删除掉错误信息就可。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐