Jake
Jake

Reputation: 2056

Trouble installing flutter on macOS High Sierra

I’ve been following a tutorial at this address but still can’t seem to run flutter doctor once I’ve finished and successfully run echo $PATH

The only reason I can think of is because I might have needed to initially change my directory to the flutter folder, and not the user folder but I doubt this would make any real difference.

I've contacted the author of this tutorial and he said that another user found this helpful;

I managed to solve it myself after I began looking into 'fish'. Apparently I had to declare the path in "~/.config/fish/config.fish" rather than "~/.bash_profile" and then of course run "source ~/.config/fish/config.fish" rather than "source ~/.bash_profile"

This is what my Terminal is looking like;

MacBook-Air:~ jake$ cd /users/jake/
MacBook-Air:jake jake$ touch .bash_profile
MacBook-Air:jake jake$ source $HOME/.bash_profile
MacBook-Air:jake jake$ echo $PATH
/flutter/bin:/flutter/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/jake/.composer/vendor/bin:/Users      /jake/.composer/vendor/bin
MacBook-Air:jake jake$ flutter doctor
-bash: flutter: command not found

I'm expecting something like this; expected result of flutter doctor

Many thanks, Jake

Upvotes: 2

Views: 2616

Answers (1)

Dinesh Balasubramanian
Dinesh Balasubramanian

Reputation: 21728

Quick fix:

  export PATH=$PATH:/Users/Jake/flutter/bin
  flutter doctor

Permanent fix:

Assuming you are using bash shell,

  • cd $HOME
  • touch .bashrc if it is not there
  • Add Quick fix line 1 as last in .bashrc file
  • Open new tab and check flutter doctor. It should work

Please lemme know if it didn't work

Upvotes: 6

Related Questions