5

I'm having trouble with installing Flutter on ubuntu.

Attached is an image of my terminal with the steps I've followed, and the files associated with the flutter directory.

I've followed the steps shown on https://flutter.io/docs/get-started/install/linux and also tried to install with git clone.

https://i.sstatic.net/ltmNd.png

1
  • Possible duplicate of Flutter commands not working Commented Feb 21, 2019 at 3:44

2 Answers 2

6

I think your problem is in the pwd part of the export command.

Replace the single quotes in 'pwd' with Backtick/back quote (``) like this

export PATH="$PATH:`pwd`/flutter/bin"


EDITED

Above command will just work until you close the terminal. To make the change permanent you have to edit the .bashrc (or .zshrc, etc), using a text editor like vim, gedit or nano and place the same command at the end of the file.

vim ~/.bashrc or nano ~/.bashrc

Add the next line at the end of the file

# Add flutter to the path
export PATH="$PATH:`pwd`/flutter/bin"

Restart your terminal and verify that your PATH was set correctly with the echo $PATH command

Good luck!!

Sign up to request clarification or add additional context in comments.

2 Comments

It will not run after close and open terminal, and unable to run at another terminal like VS Code.
@151291 Thanks for letting me know. I've edited the answer.
0

I am using Linux 18.04 version. first, add the flutter path in .bash_profile as

export PATH="$PATH:(''flutter path)/flutter/bin"

I have this problem.run the following command in the terminal

source '(flutter path)'.bash_profile'

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.