且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Mac 终端错误:-bash:/Users/tim/.profile: No such file or directory

更新时间:2022-06-08 21:27:44

这也发生在我身上,我注意到在我的 .bash_profile 顶部有:

This happened to me as well and I noticed that at the top of my .bash_profile it had:

source ~/.profile

我的理解是,在 MacOS/OS X 上 .bash_profile 优先于 .profile,因此不需要后一个文件.

My understanding is that on MacOS / OS X .bash_profile is given priority over .profile so the latter file isn't required.

为了解决这个问题,我简单地从文件顶部删除了 source ~/.profile.

To fix therefore I simply removed source ~/.profile from the top of the file.

希望有所帮助.

原始海报评论说他刚刚创建了一个空白的 .profile 来解决这个问题.

original poster commented that he just created a blank .profile to solve this as well.