showing no such file or directories everytime I open terminal

Last login: Thu Apr 29 13:55:28 on ttys000


/Users/aniketshinde/.zprofile:source:1: no such file or directory: /Users/aniketshinde/.profile


/Users/aniketshinde/.zprofile:7: no such file or directory: /opt/homebrew/bin/brew


this is always shows up when I open terminal .I uninstalled home-brew after that this is showing .I've deleted all the home brew files too

Posted on Apr 29, 2021 1:36 AM

Reply
Question marked as Top-ranking reply

Posted on Apr 29, 2021 2:29 AM

When you start a Terminal window, the shell, zsh, executes the code in ".zprofile" and this is trying to access a file called ".profile".


You need to edit the .zprofile to remove these offending lines.

If you are unsure about what this code is doing, you should probably not make changes to it.

Instead, I suggest you do this: rename this file, and then see if things are working normally.

In more detail:

a) In Terminal, rename .zprofile to something different, for example ".zprofile-inactive":


mv .zprofile .zprofile-inactive


b) Quit Terminal, and start it again

1 reply
Question marked as Top-ranking reply

Apr 29, 2021 2:29 AM in response to worthygod

When you start a Terminal window, the shell, zsh, executes the code in ".zprofile" and this is trying to access a file called ".profile".


You need to edit the .zprofile to remove these offending lines.

If you are unsure about what this code is doing, you should probably not make changes to it.

Instead, I suggest you do this: rename this file, and then see if things are working normally.

In more detail:

a) In Terminal, rename .zprofile to something different, for example ".zprofile-inactive":


mv .zprofile .zprofile-inactive


b) Quit Terminal, and start it again

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

showing no such file or directories everytime I open terminal

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.