4

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.stack.imgur.com/ltmNd.png

Gunyen
  • 51
  • 1
  • 5
  • Possible duplicate of [Flutter commands not working](https://stackoverflow.com/questions/50652071/flutter-commands-not-working) –  Feb 21 '19 at 03:44

2 Answers2

5

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

prietosanti
  • 181
  • 1
  • 1
  • 10
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'
Rahal Kanishka
  • 720
  • 13
  • 27