Skip to content
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

Merged
merged 12 commits into from
Oct 6, 2023
107 changes: 38 additions & 69 deletions src/get-started/install/_get-sdk-linux.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Copy link
Contributor

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?

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
Copy link
Member

Choose a reason for hiding this comment

The 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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you aren't using snapd ?


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:
Copy link
Member

Choose a reason for hiding this comment

The 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,
Copy link
Member

Choose a reason for hiding this comment

The 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 flutter doctor isn't just about dependencies.

run the `flutter doctor` command again.

{% include_relative _analytics.md %}

Expand All @@ -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
24 changes: 11 additions & 13 deletions src/get-started/install/linux.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Linux install
description: How to install on Linux.
title: Linux Installation Guide
atsansone marked this conversation as resolved.
Show resolved Hide resolved
description: Comprehensive guide on how to install Flutter on Linux.
atsansone marked this conversation as resolved.
Show resolved Hide resolved
short-title: Linux
next:
title: Set up an editor
Expand All @@ -9,15 +9,14 @@ next:

{% assign os = 'linux' -%}

## System requirements
## System Requirements
atsansone marked this conversation as resolved.
Show resolved Hide resolved

To install and run Flutter,
your development environment must meet these minimum requirements:
your Linux development environment needs to 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.
- **Operating System**: Linux (64-bit)
- **Disk Space**: At least 600 MB (excluding disk space for IDE/tools).
- **Tools**: Flutter relies on these command-line tools:
- `bash`
- `curl`
- `file`
Expand All @@ -28,11 +27,10 @@ your development environment must meet these minimum requirements:
- `which`
- `xz-utils`
- `zip`

- **Shared libraries**: Flutter `test` command depends on this library
being available in your environment.
- `libGLU.so.1` - provided by mesa packages such as `libglu1-mesa` on
Ubuntu/Debian and `mesa-libGLU` on Fedora.
- **Shared libraries**: To utilize the Flutter `test` command,
atsansone marked this conversation as resolved.
Show resolved Hide resolved
your environment needs the library `libGLU.so.1`.
The `mesa` packages provide this library:
`libglu1-mesa` on Ubuntu/Debian and `mesa-libGLU` on Fedora.

{% include_relative _get-sdk-linux.md %}

Expand Down
Loading