每个命令都返回'bash:< command&gt ;:找不到命令...' [英] Every command is returning 'bash: <command>: command not found...'

查看:200
本文介绍了每个命令都返回'bash:< command&gt ;:找不到命令...'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚安装了Scala,并使用gedit ./bashrc添加了路径:

I just installed Scala and added the path with gedit ./bashrc:

export SCALA_HOME=/home/avijit/scala-2.12.2
export PATH=$SCALA_HOME/bin:PATH

但是从那时起,没有任何命令在起作用:

but since then, no command is working:

[avijit@localhost-localdomain ~]$ ls
bash: ls: command not found...

我给出了完整的路径,但是:

I gave the full path but:

[avijit@localhost-localdomain ~]$ /home/avijit/.bashrc
bash: /home/avijit/.bashrc: Permission denied

即使vi也不起作用,我也可以修复路径中的混乱情况.

Even vi is not working so that I can fix the mess in the path.

[avijit@localhost-localdomain ~]$ vi /home/avijit/.bashrc
bash: vim: command not found...
[avijit@localhost-localdomain ~]$ sudo /home/avijit/.bashrc
bash: sudo: command not found...
[avijit@localhost-localdomain ~]$ echo $path

<-返回空白行

我尝试了来自不同论坛的许多步骤,但是没有运气.我该如何解决?

I tried many steps from different forums but no luck. How can I fix this?

推荐答案

问题与export PATH=$SCALA_HOME/bin:PATH有关,您错过了$.

Problem is with export PATH=$SCALA_HOME/bin:PATH in this you missed $.

将默认变量更新为PATH=$SCALA_HOME/bin:$PATH

这篇关于每个命令都返回'bash:&lt; command&gt ;:找不到命令...'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆