在终端推出错误信息

编程入门 行业动态 更新时间:2024-10-23 15:24:26
本文介绍了在终端推出错误信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我收到此错误信息,每次我启动终端:

-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:$PATH

where you meant to say

PATH=/usr/local/bin:$PATH

but 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:/bin

is 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:$PATH

Just 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?)

更多推荐

在终端推出错误信息

本文发布于:2023-11-03 20:17:29,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1555988.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:终端   错误信息

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!