close

[Solved] zsh: command not found: flutter

Hello Guys How are you all? Hope You all are fine. I have just installed flutter SDK and android studio in my macOS now I am running the flutter doctor command in my terminal and it give me the following error zsh: command not found: flutter. So today Here I come with all possible solutions for this error.

We are providing you all possible solutions to solve this error. let’s start this article without wasting your time.

How zsh: command not found: flutter Error Occurs ?

I have just installed flutter SDK and android studio in my macOS now I am running the flutter doctor command in my terminal and it give me the following error zsh: command not found: flutter.

zsh: command not found: flutter

How to Solve zsh: command not found: flutter Error?

  1. How to Solve zsh: command not found: flutter Error?

    To solve zsh: command not found: flutter Open terminal. vim $HOME/.zshrc Press “I” key for going to insert mode. add the following line in the opened file:export PATH=”$PATH:/YOUR_FLUTTER_DIR/flutter/bin” Press “Esc” then write :wq! in terminal and press enter to exit vim. Reopen the terminal and check “flutter doctor”

  2. zsh: command not found: flutter

    To solve zsh: command not found: flutter Open terminal. vim $HOME/.zshrc Press “I” key for going to insert mode. add the following line in the opened file:export PATH=”$PATH:/YOUR_FLUTTER_DIR/flutter/bin” Press “Esc” then write :wq! in terminal and press enter to exit vim. Reopen the terminal and check “flutter doctor”

Solution 1 for zsh

Problem is your terminal cant find flutter path so all we need to do is just add environment path. follow all below step to add environment path.

  1. Open terminal.
  2. vim $HOME/.zshrc
  3. Press “I” key for going to insert mode.
  4. add the following line in the opened file:export PATH="$PATH:/YOUR_FLUTTER_DIR/flutter/bin"
  5. Press “Esc” then write :wq! in terminal and press enter to exit vim.
  6. Reopen the terminal and check “flutter doctor”

Solution 2 for zsh

Simple and easy way to add your environment $PATH variable.

  • Open the file $HOME/.zshrc $HOME is your home path
  • add the following line in the opened file:
export PATH="$PATH:/YOUR_FLUTTER_DIR/flutter/bin"
  • save the changes and restart your terminal session.

Solution 3 : For zprofile 

  1. First of all, Provide Full Disk Access to Terminal by Setting -> Security & Privacy -> Full Disk Access. Add Terminal
  2. If the current terminal uses bash, change to zshell using the below commandchsh -s /bin/zsh
  3. In the root directory, i.e something like /Users/^YourAccount^ executes the below touch .zprofilevim .zprofile
  4. Now, Press I to enter insert mode. Type the below export PATH=$PATH:/Users/^YourAccount^/^YourPath^/flutter/bin
  5. then Save and quit by pressing Esc, then :wq and Enter
  6. After that Close Terminal and reopen Again. Then try executing flutter the command

Summery

So, It’s All About this Error. I hope this tutorial helps you to Solve your error. Please Comment Below if You stucks anywhere with my code. And please comment below which solution worked for you. Thank You.

Also Check Out Below Tutorials

Leave a Comment

%d bloggers like this: