在 Raspberry Pi 4 (8 GB) 上安装 Flutter

Dar*_*row 6 raspberry-pi flutter raspberry-pi4

我正在使用以下文章在 Raspberry Pi 4 中安装 Flutter https://snapcraft.io/install/flutter/raspbian#install

我收到以下错误

pi@raspberrypi:~ $ sudo snap install flutter --classic
error: snap "flutter" is not available on stable for this architecture (armhf) but exists on other architectures (amd64, arm64).
Run Code Online (Sandbox Code Playgroud)

我尝试添加arm64架构但无法添加。

pi@raspberrypi:~ $ sudo dpkg --print-architecture
armhf
pi@raspberrypi:~ $ sudo dpkg --add-architecture arm64
pi@raspberrypi:~ $ sudo dpkg --print-architecture
armhf
Run Code Online (Sandbox Code Playgroud)

尝试添加架构后,我再次尝试安装 Flutter

pi@raspberrypi:~ $ sudo snap install flutter --classic
    error: snap "flutter" is not available on stable for this architecture (armhf) but exists on other architectures (amd64, arm64).
Run Code Online (Sandbox Code Playgroud)

小智 3

您可能需要安装 Raspberry pi 操作系统的 64 位映像:https://downloads.raspberrypi.org/raspios_arm64/images/

不确定它是否已经发布,但它成功了,允许我从 Snap 安装 Flutter。