-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes to Linux Install from @wednesdei #9442
Changes from 8 commits
c3dbea6
d126729
a11c577
c712afd
c143883
240e434
9605a8b
f78c5f8
cf3b301
9b59551
9e721d1
c7c59c4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,129 +2,98 @@ | |
|
||
{% include docs/china-notice.md %} | ||
|
||
On Linux, you have two ways you can install Flutter. | ||
Install Flutter on Linux using one of the following two methods. | ||
After installation, verify your environment setup. | ||
|
||
### Install Flutter using snapd | ||
### Method 1: Install Flutter using snapd | ||
|
||
The easiest way to install Flutter on Linux is by | ||
using snapd. For more information, | ||
check out [Installing snapd][]. | ||
This offers the most direct method to install Flutter on Linux. | ||
To learn about using snapd, check [Installing snapd][]. | ||
|
||
Once you have snapd, you can | ||
[install Flutter using the Snap Store][], | ||
or at the command line: | ||
After you install `snapd`, install Flutter from the Snap Store or | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The link to the snap store listing still seems useful here. |
||
use the following command: | ||
|
||
```terminal | ||
$ sudo snap install flutter --classic | ||
``` | ||
|
||
{{site.alert.note}} | ||
Once you install snap, | ||
use the following command to display your Flutter SDK path: | ||
After you install `snapd`, | ||
atsansone marked this conversation as resolved.
Show resolved
Hide resolved
|
||
display your Flutter SDK path with the following command: | ||
|
||
```terminal | ||
$ flutter sdk-path | ||
``` | ||
{{site.alert.end}} | ||
|
||
### Install Flutter manually | ||
|
||
If you don't have `snapd`, or can't use it, | ||
you can install Flutter using the following steps. | ||
{{site.alert.end}} | ||
|
||
1. Download the following installation bundle to get the latest | ||
{{site.sdk.channel}} release of the Flutter SDK: | ||
### Method 2: Manual Installation | ||
atsansone marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
[(loading...)](#){:.download-latest-link-{{os}}.btn.btn-primary} | ||
If you don't have or can't use `snapd`, follow these steps to install Flutter. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If you aren't using |
||
|
||
For other release channels, and older builds, | ||
check out the [SDK archive][]. | ||
1. Download the installation bundle for the latest | ||
{{site.sdk.channel}} release of the Flutter SDK: | ||
|
||
1. Extract the file in the desired location. For example: | ||
[(loading...)](#){:.download-latest-link-{{os}}.btn.btn-primary} | ||
|
||
{% comment %} | ||
Our JS also updates the filename in this template, | ||
but it doesn't include the terminal formatting: | ||
You can find older builds and other release channels in the [SDK archive][]. | ||
|
||
{% prettify shell %} | ||
$ cd ~/development | ||
$ tar xf ~/Downloads/[[download-latest-link-filename]]flutter_{{os}}_vX.X.X-{{site.sdk.channel}}.tar.xz[[/end]] | ||
{% endprettify %} | ||
{% endcomment -%} | ||
2. Extract the downloaded file to a location of your choice: | ||
|
||
```terminal | ||
$ cd ~/development | ||
$ tar xf ~/Downloads/flutter_{{os}}_vX.X.X-{{site.sdk.channel}}.tar.xz | ||
``` | ||
1. Add the `flutter` tool to your path: | ||
|
||
3. Add the `flutter` tool to your path: | ||
|
||
```terminal | ||
$ 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, | ||
This command sets your `PATH` environment variable for the current | ||
terminal window only. | ||
To add Flutter as permenant part of your path, | ||
atsansone marked this conversation as resolved.
Show resolved
Hide resolved
|
||
check out [Update your path][]. | ||
|
||
1. Optionally, pre-download development binaries: | ||
|
||
The `flutter` tool downloads platform-specific | ||
development binaries as needed. For scenarios | ||
where pre-downloading these artifacts is preferable | ||
(for example, in hermetic build environments, | ||
or with intermittent network availability), iOS | ||
and Android binaries can be downloaded ahead of time by running: | ||
4. (Optional) Pre-download development binaries: | ||
|
||
```terminal | ||
$ flutter precache | ||
``` | ||
|
||
For additional download options, | ||
check out `flutter help precache`. | ||
|
||
You are now ready to run Flutter commands! | ||
To find additional download options, run `flutter help precache`. | ||
|
||
{{site.alert.note}} | ||
To update an existing version of Flutter, | ||
check out [Upgrading Flutter][]. | ||
To update an existing version of Flutter, see [Upgrading Flutter][]. | ||
{{site.alert.end}} | ||
|
||
### Post Installation: Run flutter doctor | ||
atsansone marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
### Run flutter doctor | ||
After installing Flutter, run `flutter doctor`. | ||
This command checks your environment and displays a report in the | ||
terminal window. | ||
Flutter bundles the Dart SDK. You don't need to install Dart. | ||
Review the output for further tasks to perform. | ||
|
||
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): | ||
For verbose output, add the `-v` flag: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nit: This doesn't provide enough information to the reader why they would want to do this. Will it help them debug the listed issues, etc? |
||
|
||
```terminal | ||
$ flutter doctor | ||
``` | ||
|
||
This command checks your environment and displays | ||
a report to the terminal window. | ||
The Dart SDK is bundled with Flutter; | ||
it isn't necessary to install Dart separately. | ||
Check the output carefully for other software you might | ||
need to install or further tasks to perform (shown in **bold** text). | ||
|
||
For example: | ||
The output might resemble the following: | ||
|
||
<pre> | ||
```terminal | ||
atsansone marked this conversation as resolved.
Show resolved
Hide resolved
|
||
[-] Android toolchain - develop for Android devices | ||
• Android SDK at /Users/dash/Library/Android/sdk | ||
<strong>✗ Android SDK is missing command line tools; download from https://goo.gl/XxQghQ</strong> | ||
• Try re-installing or updating your Android SDK, | ||
visit {{site.url}}/setup/#android-setup for detailed instructions. | ||
</pre> | ||
|
||
The following sections describe how to perform | ||
these tasks and finish the setup process. | ||
``` | ||
|
||
Once you have installed any missing dependencies, | ||
run the `flutter doctor` command again to verify | ||
that you've set everything up correctly. | ||
After installing any missing dependencies, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The previous text also discussed "tasks to perform", but the changes lose that. It would be good to still add that clarification since |
||
run the `flutter doctor` command again. | ||
|
||
{% include_relative _analytics.md %} | ||
|
||
|
@@ -133,4 +102,4 @@ that you've set everything up correctly. | |
[Installing snapd]: https://snapcraft.io/docs/installing-snapd | ||
[SDK archive]: {{site.url}}/release/archive | ||
[Update your path]: #update-your-path | ||
[Upgrading Flutter]: {{site.url}}/release/upgrade | ||
[Upgrading Flutter]: {{site.url}}/release/upgrade |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Flutter on Linux sounds odd to my ears. Flutter for Linux?