1

I am trying to permanently add flutter to my PATH. I will tell you what I previously did. So I unzipped the MacOS version in my user folder. Then I went into my .bash-profile and added export PATH:/Users/kayajones/flutter/bin:$PATH. Saved that quit out of the terminal completely and when I type flutter I get the "env: bash: No such file or directory". I also tried deleting flutter and reinstalling and doing the steps over again. Still no luck, I've been stuck on this all day. The setup process is a pain. Sorry in advance i dont have a high enough reputation to be adding in images. bash error

3
  • 2
    That line should be export PATH="/Users/kayajones/flutter/bin:$PATH" -- note the equal sign and double-quotes. Commented Jul 23, 2020 at 2:52
  • Does this answer your question? Adding a new entry to the PATH variable in ZSH Commented Jul 23, 2020 at 3:02
  • @omajid I already have that in my .bash-profile I also added in double-quotes and quitted terminal. now when I open back up the terminal some of my commands aren't working for example ls and vim. Also when I type in: source .bash-profile it says that there is no file or directory Commented Jul 23, 2020 at 12:51

3 Answers 3

0
  1. First, make sure you got the path right.
  2. Then try adding export PATH="$PATH:/Users/kayajones/flutter/bin" to your .bash-profile file.
  3. Then exit the terminal and restart it.
  4. Then run source .bash-profile
Sign up to request clarification or add additional context in comments.

9 Comments

now when i try to run any command like or example ls or vim it is saying that the command is not found. When i tried to run: source .bash-profile it says no such file or directory. @Buckyball
The command source is used to run bash config files
It once happened with me too. This usually happens due to one of the lines .bash-profile. Now, you have to edit .bash-profile manually using a text editor and find out the error blocking resource
I have updated the answer, try it, if it doesn't work then try removing the '/' before 'Users'
ok, when I open up _bash.profile in my vscode no text is in there. Is that where i add the export code. or is _bash.profile different from .bash-profile? @Buckyball
|
0

What worked for me was:

cd $home

nano ~/.bash_profile

export PATH="$HOME/Documents/_____/flutter/bin:$PATH"

Instead of:

export PATH="$HOME/Users/ Name /Documents/_____/flutter/bin:$PATH"

Comments

0

enter image description here

Follow image arrow works inn macOS BigSur

Comments