flutter-environment-setup-linux by flutter/skills
npx skills add https://github.com/flutter/skills --skill flutter-environment-setup-linux通过安装所需的系统先决条件、管理特定于操作系统的配置以及验证工具链,为 Flutter 桌面应用程序开发配置 Linux 环境(Debian/Ubuntu 或 ChromeOS)。
apt-get 软件包更新和安装。apt-get 包管理器。确定主机操作系统: 停止并询问用户: "您是在标准的 Debian/Ubuntu Linux 发行版上设置此 Flutter 环境,还是在 Chromebook (ChromeOS) 上?"
处理 ChromeOS 先决条件(条件性): 如果用户表示他们在 Chromebook 上:指导用户导航到其 ChromeOS 设置,打开"Linux 开发环境",并确保其已完全更新。停止并询问用户: "请确认 Linux 支持已启用并更新,以便我们可以继续软件包安装。"
更新系统软件包: 执行以下命令以刷新软件包列表并升级现有软件包:
sudo apt-get update -y && sudo apt-get upgrade -y
安装核心先决条件: 安装 Flutter 在 Linux 上运行和构建所需的基本依赖项:
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
sudo apt-get install -y curl git unzip xz-utils zip libglu1-mesa
安装 Linux 桌面工具链: 安装编译 Linux 桌面应用程序所需的特定 C/C++ 工具链和 GTK 库:
sudo apt-get install -y clang cmake ninja-build pkg-config libgtk-3-dev libstdc++-12-dev
IDE 配置提示: 停止并询问用户: "为了获得最佳体验,建议使用支持 Flutter 的 IDE。您希望我提供 Visual Studio Code 或 Android Studio 的安装命令吗?"
sudo snap install --classic codesudo snap install android-studio --classic验证环境: 运行 Flutter 诊断工具以验证 Linux 工具链和设备可用性:
flutter doctor -v
flutter devices
验证与修复: 分析 flutter doctor -v 的输出。
sudo apt-get install -y <packages> 命令并执行它。flutter devices 未列出 linux 平台设备,请验证 libgtk-3-dev 软件包是否已成功安装并重新运行验证。sudo 权限,并且不解释基本的权限提升概念。curl、cmake)的作用;假设用户了解标准的 Linux 开发工具。apt-get 进行包管理,以确保非交互式兼容性(必须包含 -y 标志)。bash 代码块中。每周安装次数
771
代码仓库
GitHub 星标数
784
首次出现
2026年3月4日
安全审计
安装于
codex754
gemini-cli751
cursor751
opencode750
kimi-cli749
amp749
Configures a Linux environment (Debian/Ubuntu or ChromeOS) for Flutter desktop application development by installing required system prerequisites, managing OS-specific configurations, and validating the toolchain.
apt-get package updates and installations.apt-get package managers.Determine the Host Operating System: STOP AND ASK THE USER: "Are you setting up this Flutter environment on a standard Debian/Ubuntu Linux distribution, or on a Chromebook (ChromeOS)?"
Handle ChromeOS Prerequisites (Conditional): If the user indicates they are on a Chromebook: Instruct the user to navigate to their ChromeOS Settings, turn on "Linux development environment", and ensure it is fully updated. STOP AND ASK THE USER: "Please confirm once Linux support is enabled and updated so we can proceed with the package installation."
Update System Packages: Execute the following command to refresh the package lists and upgrade existing packages:
sudo apt-get update -y && sudo apt-get upgrade -y
Install Core Prerequisites: Install the base dependencies required for Flutter to operate and build on Linux:
sudo apt-get install -y curl git unzip xz-utils zip libglu1-mesa
Install Linux Desktop Toolchain: Install the specific C/C++ toolchain and GTK libraries required to compile Linux desktop applications:
sudo apt-get install -y clang cmake ninja-build pkg-config libgtk-3-dev libstdc++-12-dev
IDE Configuration Prompt: STOP AND ASK THE USER: "For the best experience, an IDE with Flutter support is recommended. Would you like me to provide the installation commands for Visual Studio Code or Android Studio?"
sudo snap install --classic codesudo snap install android-studio --classicValidate the Environment: Run the Flutter diagnostic tool to verify the Linux toolchain and device availability:
flutter doctor -v
flutter devices
Validate-and-Fix: Analyze the output of flutter doctor -v.
* If the "Linux toolchain" section reports missing dependencies, parse the missing package names, construct a new `sudo apt-get install -y <packages>` command, and execute it.
* If `flutter devices` does not list a `linux` platform device, verify that the `libgtk-3-dev` package was successfully installed and re-run the validation.
sudo privileges and do not explain basic privilege escalation concepts.curl, cmake) do; assume the user understands standard Linux development tools.apt-get for package management to ensure non-interactive compatibility (-y flags must be present).bash code blocks.Weekly Installs
771
Repository
GitHub Stars
784
First Seen
Mar 4, 2026
Security Audits
Gen Agent Trust HubWarnSocketPassSnykWarn
Installed on
codex754
gemini-cli751
cursor751
opencode750
kimi-cli749
amp749
agent-browser 浏览器自动化工具 - Vercel Labs 命令行网页操作与测试
136,300 周安装