How to Install Flutter on Ubuntu Linux

Flutter is a new way to build high-performance, cross-platform mobile apps. If you are new to Flutter, you may first read the more information about flutter at What is Flutter and Flutter Engine ? and you can find lot of other related articles about flutter at HERE

Now, lets get back to action, and install Flutter on Ubuntu. At the time of writing this article, we were using “Ubuntu 18.04.2 LTS”on 64 bit Laptop

$ mkdir ubuntu
$ cd ubuntu

Verify commands like “rm”, “which” and “mkdir” are present on your ubuntu machine (Which most likely would be present, you can verify by typing command “which” on terminal and then “which rm”, “which mkdir”)

We will need to install the dependent packages as,

$ sudo apt-get install bash curl git unzip xz-utils libglu1-mesa

On Ubuntu If you face an error like as below,
“E: Unable to fetch some archives, maybe run apt-get update or try with –fix-missing?”

Run the command,

 $ sudo apt-get --fix-missing

and then again, type command,

 $ sudo apt-get install bash curl git unzip xz-utils libglu1-mesa

Download Flutter SDK

$ mkdir development
$ cd development
$ wget -c https://storage.googleapis.com/flutter_infra/releases/stable/linux/flutter_linux_v1.5.4-hotfix.2-stable.tar.xz

You can download Latest Stable version from https://flutter.dev/docs/development/tools/sdk/releases?tab=linux

$ tar xvf flutter_linux_v1.5.4-hotfix.2-stable.tar.xz

Add the flutter tool to your path:

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

This command sets your PATH variable for the current terminal window only. Now, check if Flutter has been added to your path as,

$ which flutter
/home/devlab/devlab/flutter/ubuntu/devlopment/flutter/bin/flutter

You can add this command permanantly to your path by modifying .bashrc file as below,

 $ vim ~/.bashrc 

Add your flutter bin directory path as below [ Note: Our extracted flutter SDK was present at “/home/devlab/devlab/flutter/ubuntu/devlopment/flutter” hence above command has shown the same path in “which” command

Related :   How to add Android Share dialog to website using Web Share API

Go to last, and append following line by modifying your proper path

export PATH=$PATH:YOUR_FLUTTER_SDK_PATH/flutter/bin

Now, open a new terminal and if you type flutter command, it should show the help, it means flutter SDK path has bin added to your terminal PATH

Once you Installed Flutter, follow our next post “Setting up Flutter development Environment for Ubuntu Linux and Verify using “flutter doctor”

Android Android Commands Android Java Applications Application Libraries Application Stack / User Interface Bash / Shell Scripts Commands and Packages Compilation Content Management System - CMS Core Kernel C Programs Development & Build Development Environment Setup Errors & Failures Flutter git Go Language Programs Hardware Platforms HTML JAVA Programs Kernel & Device Drivers Linux, OS Concepts and Networking Linux Device Drivers Linux Host, Ubuntu, SysAdmin Linux Kernel Linux Networking Middleware Libraries, HAL Monetization / Google AdSense NDK / Middleware / HAL OS Concepts PHP Programming Languages RaspberryPi Scripting and Automation Search Engine Optimisation ( SEO ) Social Media Socurce Code Management ( SCM ) System Administration, Security Testing and Debugging Uncategorized User Interface Userspace Utilities Web design and development Wordpress Yocto / Bitbake / Openembedded

Leave a Reply / Ask Question