Error executing a Flutter command

Asked

Viewed 455 times

1

To test whether the flutter was correctly installed on my Linux machine I wrote in bash the following command : flutter doctor and received the following return message :

zsh: command not found: flutter

My attempt was to cross the path to my Flutter’s SDK export PATH=$HOME/bin:/usr/local/bin:$PATH:/home/gabriel_rc/flutter , but it didn’t work.

How can I solve this problem?

2 answers

2


By error message you are using the zsh and not the bash. Then edit your environment variables in the file .zshrc at the root of your user, if it does not exist, create with:

export PATH=/home/gabriel_rc/flutter/bin:$PATH
  • Thanks for the answer ! A question : is this line of code to be inserted at the end of the file? I tried and did not succeed

  • Anywhere, as long as it’s not mentioned. I’m using Mac and not Linux, but try by the pattern quoted in this answer https://stackoverflow.com/a/11530176/7323067

  • It worked! Thank you very much

  • @Gabrielribeirocarneiro Show! You can mark the answer as accepted then ;)

1

1) Open the file . bashrc that is in your /home/gabriel_rc

2) Add this line of code last in the file

export PATH="$PATH:/home/gabriel_rc/flutter/bin"

3) Save the file changes and restart the terminal session (just close the terminal and open again)

View documentation here for the linux installation

  • Obg for the answer. I’ve done this procedure, but it didn’t work

  • Are you placing the /bin at the end of the path? I saw that you wrote the path only up to /flutter.

  • is currently : export PATH="$PATH:/home/gabriel_rc/flutter/bin"

Browser other questions tagged

You are not signed in. Login or sign up in order to post.