Mac Terminal error: -bash: /Users/tim/.profile: No such file or directory

混江龙づ霸主 提交于 2019-12-20 11:37:10

问题


Every time I open a new Terminal window I see the following.

-bash: /Users/tim/.profile: No such file or directory

I have no idea why this is happening or where to look to fix it; my profile is located at /Users/tim/.bash_profile not /Users/tim/.profile

Any thoughts on how to troubleshoot this?


回答1:


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

source ~/.profile

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

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

Hope that helps.

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




回答2:


I met the same issue today, i guess it's because i use the cleaning app and the app considered this file was a waste of space so deleted it. touch ~/.profile helps me.



来源:https://stackoverflow.com/questions/40157445/mac-terminal-error-bash-users-tim-profile-no-such-file-or-directory

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!