pythonapple-m1modularmojolang

installed mojo programming language but finding a repeating command when executed


  1. I've installed mojo on my compute : and went to ran the code 'nano__.zprofile'
  2. previously when downloading modular/mojo I ve got network issue, couple of times so I've done it multiple times
  3. Now when I executed this command in the terminal and I am getting "$(/opt/homebrew/bin/brew shellenv)"' multiple[precisely 3X times]
  4. I need a detailed solution how to ommit or get rid of last 2 repetition of those lines5. Needed them in detail as I just started coding today, probably trying to learn....

Solution

  • This is not a Mojo but a Homebrew issue. To fix it, edit your .zprofile with nano inside the terminal with

    nano ~/.zprofile.

    There should be exactly one line related to Homebrew that reads

    eval "$(/opt/homebrew/bin/brew shellenv)"
    

    Remove all duplicate lines. If you've added Homebrew to your PATH manually, you don't even need that one line. Try to comment it out and restart the terminal to check if that is the case.

    See this GitHub issue for further information.