事先说明:请大家到官网上重新确认flutter最新稳定版本的版本号。
System requirements
To install and run Flutter, your development environment must meet these minimum requirements:
- Operating Systems: Linux (64-bit)
- Disk Space: 600 MB (does not include disk space for IDE/tools).
- Tools: Flutter depends on these command-line tools being available in your environment.
bash
curl
git
2.xmkdir
rm
unzip
which
xz-utils
- Shared libraries: Flutter
test
command depends on this library being available in your environment.libGLU.so.1
- provided by mesa packages e.g.libglu1-mesa
on Ubuntu/Debian
Get the Flutter SDK
-
Download the following installation bundle to get the latest stable release of the Flutter SDK:
-
For other release channels, and older builds, see the SDK archive page.
-
Extract the file in the desired location, for example:
cd ~/development
tar xf ~/Downloads/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. To permanently add Flutter to your path, see Update your path.
-
Optionally, pre-download development binaries:
The
flutter
tool downloads platform-specific development binaries as needed. For scenarios where pre-downloading these artifacts is preferable (e.g., hermetic build environments, intermittent network availability), iOS and Android binaries can be downloaded ahead of time by running
flutter precache
For additional download options, see flutter help precache
.
You are now ready to run Flutter commands!
Note: To update an existing version of Flutter, see Upgrading Flutter.
Run flutter doctor
Run the following command to see if there are any dependencies you need to install to complete the setup (for verbose output, add the -v
flag
flutter doctor
This command checks your environment and displays a report to the terminal window. The Dart SDK is bundled with Flutter; it is not necessary to install Dart separately. Check the output carefully for other software you may need to install or further tasks to perform (shown in bold text).
Copy from https://flutter.dev/docs/get-started/install/linux