我收到此错误信息,每次我启动终端:
-bash:=在/ usr / local / bin目录:在/ usr / local / bin目录:在/ usr / bin中:/ bin中:/ usr / sbin目录:/ sbin目录中:/ opt / X11 /斌:没有这样的文件或目录解决方案
您最近已修改了你的shell启动的一个文件,并引入了一个错误。
也许, LS -lart的〜/ .bashrc〜/ .bash_profile中〜/ .profile文件将表明哪一个 - 如果一个或多个缺失,这是没有的关注,我们只是想看到您最近已修改其中一个出这些。检查时间戳,要尽量记住你没有改变这些文件中的一个东西。
该错误可能看起来像
$ oopsPATH =的/ usr / local / bin目录:$ PATH在这里你的意思是说
PATH =的/ usr / local / bin目录:$ PATH但没有访问您的文件,我们无法知道究竟是应该在那里,不然你怎么把事情搞糟了。
又见askubuntu/questions/198730/how-to-restore-bashrc-file/198740#198740
在那里你搞乱了通常情况下你的 PATH 让 LS 等命令不可用(庆典:LS:命令未找到),你可以使用完整路径( /斌/ LS 亲 LS 等;但很明显,你必须知道正确的路径)至少直到您能恢复您的配置
PATH =的/ usr / local / bin目录:在/ usr / bin中:/ bin中可能是一个不错的拐杖,直到你可以找到你的操作系统正确的默认。您可以在提示符下键入,或把它放在你的shell启动的一个文件,并启动新的外壳。
更新:接近你的的.bash_profile 是错误的顶端此片段:
#loginPath=在/ usr / local / bin目录:$ PATH只是把它拿出来;它似乎并没有做什么有用的东西。似乎有从MacPorts的安装程序看起来错了,太多次额外片段,只不过他们的意见。 (也许是不知何故,他们不应该?)
I receive this error message each time I launch terminal:
-bash: =/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin: No such file or directory解决方案
You have recently edited one of your shell's startup files and introduced an error.
Probably, ls -lart ~/.bashrc ~/.bash_profile ~/.profile will indicate which one -- if one or more is missing, that's no concern, we just want to see which one out of these you have edited recently. Examine the time stamps and try to remember what you did to change one of these files.
The error probably looks something like
$oopsPATH=/usr/local/bin:$PATHwhere you meant to say
PATH=/usr/local/bin:$PATHbut without access to your files, we can't know what exactly is supposed to be there, or how you messed it up.
See also askubuntu/questions/198730/how-to-restore-bashrc-file/198740#198740
In the common case where you have messed up your PATH so that ls and other commands are unavailable (bash: ls: command not found), you can use the full path (/bin/ls pro ls, etc; though obviously, you have to know the correct path) at least until you can restore your configuration.
PATH=/usr/local/bin:/usr/bin:/binis probably a good crutch until you can find the correct default for your OS. You can type that at the prompt, or put it in one of your shell's startup files and start a new shell.
Update: This fragment near the top of your .bash_profile is erroneous:
#loginPath =/usr/local/bin:$PATHJust take it out; it doesn't seem to do anything useful. There seem to be multiple additional fragments from the MacPorts installer which look wrong, too, but they are just comments. (Perhaps somehow they shouldn't be?)
更多推荐
在终端推出错误信息
发布评论