Terminal and software installation problem

Dear all, I have been trying to install Java but after installation, Java cannot be locate in this Mac. I have been trying to do several re-installation but nothing changed. I try to remove all the downloaded Java installation files through the terminal shell incase there is redundant version of Java. Now, every time, I opened the terminal / open the Mac, it shows some notification/message.


May i know where it goes wrong ? and why Java installation keep failing. By the way, I cannot install the Java through Homebrew. It must be stand alone.


Thanks

MacBook Air

Posted on Dec 21, 2022 5:35 AM

Reply
Question marked as Top-ranking reply

Posted on Dec 21, 2022 8:42 AM

You need to tell us how exactly you are trying to install java.

The error message does point to a reference to homebrew.


Your .zprofile, which is a file in your home folder with commands that are executed when you start a new Terminal or Terminal window, has a command that is calling something in /opt/homebrew/bin/brew and is failing.


Perhaps if you can tell us the contents of your .zprofile we can better understand what it is trying to do.


In Terminal, you can run this command:


cat .zprofile | pbcopy


Then in a reply here, click the "Additional text" button:

and paste into the text box.

Similar questions

2 replies
Question marked as Top-ranking reply

Dec 21, 2022 8:42 AM in response to Aina--

You need to tell us how exactly you are trying to install java.

The error message does point to a reference to homebrew.


Your .zprofile, which is a file in your home folder with commands that are executed when you start a new Terminal or Terminal window, has a command that is calling something in /opt/homebrew/bin/brew and is failing.


Perhaps if you can tell us the contents of your .zprofile we can better understand what it is trying to do.


In Terminal, you can run this command:


cat .zprofile | pbcopy


Then in a reply here, click the "Additional text" button:

and paste into the text box.

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.

Terminal and software installation problem

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