在 Raspberry Pi 上安装 Flutter 4 (8 G.B。)

Installing Flutter on Raspberry Pi 4 (8 G.B.)

我正在使用以下文章在 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).

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

pi@raspberrypi:~ $ sudo dpkg --print-architecture
armhf
pi@raspberrypi:~ $ sudo dpkg --add-architecture arm64
pi@raspberrypi:~ $ sudo dpkg --print-architecture
armhf

尝试添加架构后,我再次尝试安装 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).

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

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