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
Asked
Active
Viewed 8,607 times
1
-
2That line should be `export PATH="/Users/kayajones/flutter/bin:$PATH"` -- note the equal sign and double-quotes. – Gordon Davisson Jul 23 '20 at 02:52
-
Does this answer your question? [Adding a new entry to the PATH variable in ZSH](https://stackoverflow.com/questions/11530090/adding-a-new-entry-to-the-path-variable-in-zsh) – omajid Jul 23 '20 at 03: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 – Jul 23 '20 at 12:51
3 Answers
0
- First, make sure you got the path right.
- Then try adding
export PATH="$PATH:/Users/kayajones/flutter/bin"
to your .bash-profile file. - Then exit the terminal and restart it.
- Then run
source .bash-profile

sidrao2006
- 1,228
- 2
- 10
- 32
-
1now 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 – Jul 23 '20 at 12:47
-
-
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 – sidrao2006 Jul 23 '20 at 12:52
-
I have updated the answer, try it, if it doesn't work then try removing the '/' before 'Users' – sidrao2006 Jul 23 '20 at 12:55
-
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 – Jul 23 '20 at 12:55
-
-
I can't even open anything up or look for the .bash-profile from my terminal. it says vim command not found – Jul 23 '20 at 12:59
-
How do i get to .bash_profile the only thing i see to edit in my text editor is _bash.profile – Jul 23 '20 at 13:03
-
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"

Adrian Mole
- 49,934
- 160
- 51
- 83

Darx24
- 1
- 1