macos - 终端打开时显示 'No such file or directory'

标签 macos git bash terminal

最近几天我的终端一直在说

-bash:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/git/bin: 没有那个文件或目录

但是,上述所有情况都存在。上周我在玩弄 $PATH 变量,但在我停止使用 $PATH 变量几天后,我现在遇到的错误出现了。

Here's a screenshot of the error in my termianl.app

这是我也在玩的 .bash_profile 的内容:

The contents of my .bash_profile

最佳答案

.bash_profile 的第一行就是问题所在。

该行试图将 /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/git/bin 作为命令运行这会导致您在启动 shell 时看到的错误。

删除该行,错误应该消失。

关于macos - 终端打开时显示 'No such file or directory',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30373336/

相关文章:

git - "Make sure you configure your ' user.email ' and ' user.name ' in git"尝试推送到 git lab 时

linux - 在文件中运行时,BLKID 在 Linux 中不提供输出

java - Mac 和 PC 之间的 NetBeans

macos - 在Eclipse中使用Gradle导入时未找到SDK位置错误

node.js - 触摸板捏合缩放在 Electron (MacOS) 中不起作用

git - Jenkins:使用来自另一个 repo 的 jenkinsfile 构建多分支管道

git - 什么时候 2 个补丁在 git 中被认为是相等的?

bash - 从 git 命令捕获输出?

swift - -[NSConcreteTask waitUntilExit] 导致 KERN_PROTECTION_FAILURE

c - 相当于 OSX 中的 msdn TIME_ZONE_INFORMATION 结构