dart sdk install on steamos

Installing the Dart SDK on SteamOS is complex because SteamOS uses an immutable file system that is reset with system updates. The recommended approach is to use the Flatpak package manager in Desktop Mode or install the Flutter SDK, which includes the Dart SDK. 

Recommended Option: Install Flutter (includes Dart SDK) 

Installing Flutter via Flatpak is the most reliable method, as it does not require disabling the read-only file system.

Switch to Desktop Mode: Press the Steam button, navigate to Power, and select Switch to Desktop.

Open Discover: In the desktop interface, find and open the Discover Software Center (usually in the taskbar or applications menu).

Search for Flutter: Use the search function in Discover to find the Flutter application (which is packaged as a Flatpak).

Install Flutter: Select the Flutter application and click Install. This will automatically install the complete Dart SDK as part of the Flutter environment.

Verify Installation: Open a terminal application (e.g., Konsole) and run flutter doctor to verify the installation and check for any missing dependencies. The dart command-line tool will be available in the Flutter SDK's bin folder. 

Alternative Option: Manual Installation (Advanced Users)

This method involves disabling the read-only file system and making changes at the OS level, which is not officially supported by Valve and may lead to system instability or be overwritten by system updates. 

Switch to Desktop Mode: Follow the steps above to switch to Desktop Mode.

Open Terminal: Launch the Konsole terminal application.

Set a Sudo Password: If you haven't already, set a password for the deck user by running passwd.

Disable Read-Only Mode: Execute the following command to make the system writable:

bash

sudo steamos-readonly disable

Initialize Pacman Keyring: SteamOS is Arch-based and uses Pacman as its package manager, but the keyring is empty by default. Run the following to populate it:

bash

sudo pacman-key --init

sudo pacman-key --populate archlinux

Install Dart SDK: Use Pacman to install the Dart SDK:

bash

sudo pacman -S dart

Re-enable Read-Only Mode (Recommended): To maintain system stability, re-enable the read-only mode after installation:

bash

sudo steamos-readonly enable

Verify Installation: Run dart --version to confirm the installation. 

For further details on Dart installation methods, refer to the official Get the Dart SDK page.  

Ada pertanyaan? Diskusikan dengan penulis atau pengguna lain
Tautan disalin ke papan klip!