简体   繁体   English

无法在树莓派零 W 上加载 Dart SDK

[英]Unable to Load Dart SDK on Raspberry Pi Zero W

I'm trying to get the Dart SDK on a Pi Zero W.我正在尝试在 Pi 零 W 上安装 Dart SDK。

When I download the SDK archive, extract it, and put it in the /usr/lib folder manually, I get segmentation faults when I try to run any of the command line tools.当我下载 SDK 存档,解压缩并手动将其放入 /usr/lib 文件夹时,当我尝试运行任何命令行工具时,我会遇到分段错误。 I reflashed the memory card (32GB, so plenty large) from scratch from an x64 machine and pre-loaded the SDK as well to help ensure that there wasn't any funky Pi file corruption and got the same result.我从 x64 机器上重新刷新了 memory 卡(32GB,非常大)并预加载了 SDK 以帮助确保没有任何时髦的 Pi 文件损坏并得到相同的结果。

Though I was sure it wouldn't work, I loaded the ARM7 version of the SDK, and got executable file format incompatibility errors that were not surprising.虽然我确信它不会工作,但我加载了 SDK 的 ARM7 版本,并得到了不足为奇的可执行文件格式不兼容错误。

I downloaded the.deb package, and got a warning that the file was not meant for my Pi and that I might break things, so I didn't try to install it.我下载了.deb package,并收到警告说该文件不适用于我的 Pi,而且我可能会破坏某些东西,所以我没有尝试安装它。

I used the apt-get instructions from the Dart website and that failed with the error "E: Unable to locate package dart" which seems to indicate that I had the incorrect name for the package (note: I copied and pasted it directly from the Dart website). I used the apt-get instructions from the Dart website and that failed with the error "E: Unable to locate package dart" which seems to indicate that I had the incorrect name for the package (note: I copied and pasted it directly from the Dart 网站)。 I tried to look through the repository contents, and assuming that I looked at the correct file, there were not any Dart entries in it, so the error is not surprising.我尝试查看存储库内容,并假设我查看了正确的文件,其中没有任何 Dart 条目,因此该错误不足为奇。

My Linux competence is suspect, so I could use any ideas.我的 Linux 能力值得怀疑,所以我可以使用任何想法。 I'd prefer not to build the SDK from scratch as, in my experience, open source build instructions almost always assume that the user needs to know/do something that is not explicitly listed in the instructions, so that tends to be a 2-hour effort that ultimately fails (pretty sure I'm not the only one who's had that experience).我不希望从头开始构建 SDK,因为根据我的经验,开源构建说明几乎总是假设用户需要知道/执行说明中未明确列出的事情,因此这往往是 2-最终失败的小时努力(很确定我不是唯一有这种经验的人)。

Thoughts, anyone?想法,有人吗?

That is not going to work.那是行不通的。 Your problem is that "Pi Zero W" is a "1GHz single-core ARMv6 CPU (BCM2835)" CPU which means it can only execute programs for the ARMv6 architecture or lower.您的问题是“Pi Zero W”是“1GHz 单核 ARMv6 CPU (BCM2835)”CPU ,这意味着它只能执行 ARMv6 架构或更低架构的程序。

Dart does have a minimum requirement for ARMv7 since they removed support for ARMv6 early this year: https://github.com/dart-lang/sdk/issues/42069 Dart 确实对 ARMv7 有最低要求,因为他们今年早些时候取消了对 ARMv6 的支持: https://github.com/dart-lang/sdk/issues/42069

The support was never that great for ARMv6 (I did have an old Raspberry Pi) and programs was running really slow with missing support for FFI.对 ARMv6 的支持从来没有那么好(我确实有一个旧的 Raspberry Pi),并且由于缺少对 FFI 的支持,程序运行速度非常慢。 So my recommendation is to get a board which supports ARMv7 or ARMv8 (ARM64) which works really great.所以我的建议是买一块支持 ARMv7 或 ARMv8 (ARM64) 的主板,它真的很棒。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM