Trying to add path to locate flutter to run "flutter doctor" to solve "zsh: command not found: flutter"
You're trying to open your bash_profile
using nano
(text editor) which you don't have installed. You can open that file using any text editor you have. Also, I see you're using zsh and not bash, this means that you should actually edit your ~/.zshrc
or ~/.zprofile
instead and add
PATH=</path/to/flutter>:$PATH
where you replace </path/to/flutter>
with the actual path to flutter on your machine. You can do this if you don't want to add it manually:
echo 'export PATH=</path/to/flutter>:$PATH' >> ~/.zshrc && source ~/.zshrc
again, replacing </path/to/flutter>
with your actual flutter path.
Pretty Girl
Updated on December 06, 2022Comments
-
Pretty Girl 11 months
Trying to add path to locate flutter so 'flutter doctor' can be run, to solve
zsh: command not found: flutter
, then I found that creating below is first step to solution, but again terminal saysnano ~/.bash_profile zsh: command not found: nano
then trying to create bash profile also not working, may be it's existing, but somehow it says below.
$HOME/.bash_profile
zsh: permission denied: /Users/prettygirl/.bash_profile
terminal is given full file access in macOS restarted my macmini vscode quitted and restarted, terminal quitted and restarted
problem still persists. Is there any way to add path variables easily than going through all this hassle with terminal? like macos menu or something to add system path variables?
-
Pretty Girl almost 2 yearsstill does not work and when I check it with
echo $PATH
it shows repeated paths, how to delete other ones?/Users/prettygirl/FlutterSDK/flutter/bin:/Users/prettygirl/FlutterSDK/flutter/bin:“/Users/prettygirl/FlutterSDK/flutter/bin:@PATH:/Users/prettygirl/FlutterSDK/flutter/bin”