Gunyen
Gunyen

Reputation: 51

"flutter: command not found" in ubuntu

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

Upvotes: 4

Views: 9142

Answers (2)

mc bhavana
mc bhavana

Reputation: 1

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'

Upvotes: 0

prietosanti
prietosanti

Reputation: 327

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!!

Upvotes: 6

Related Questions