【发布时间】:2021-10-05 05:56:06
【问题描述】:
我正在尝试在运行 Raspberry Pi OS 的 Raspberry Pi Zero W 上使用 Julia 中的 PortAudio 包,如下所示:
using Pkg
Pkg.add("PortAudio")
这失败并出现错误:
ERROR: Unsatisfiable requirements detected for package PortAudio [80ea8bcb]:
PortAudio [80ea8bcb] log:
├─possible versions are: 1.1.1-1.1.2 or uninstalled
├─restricted to versions * by an explicit requirement, leaving only versions 1.1.1-1.1.2
└─restricted by julia compatibility requirements to versions: uninstalled — no versions left
apt 中 Julia 的版本是 v1.0.3,这解释了上面的错误。所以我正在尝试安装最新版本的 Julia。 pre-compiled binaries 不会运行(Illegal instruction 错误)所以我正在尝试按照 here 的说明编译它:
sudo apt-get -y update
sudo apt-get install build-essential libatomic1 python gfortran perl wget m4 cmake pkg-config libopenblas-dev git ccache
然后我将此添加到/etc/dphys-swapfile
CONF_SWAPSIZE=8192
CONF_MAXSWAP=8192
然后
git clone https://github.com/JuliaLang/julia.git
cd julia
git checkout v1.6.2
make
失败并出现以下错误:
Illegal instruction
make[1]: *** [Makefile:222: julia_flisp.boot] Error 132
make: *** [Makefile:43: julia_flisp.boot.inc.phony] Error 2
我认为这里的问题是你需要告诉它 Pi 使用哪个 ARM CPU,所以按照these instructions 和this thread 我将它添加到Make.user:
JULIA_CPU_TARGET=arm1176jzf-s
USE_BINARYBUILDER=0
但我得到了同样的错误,尽管有人建议尝试make -C deps clean-openblas 并使用make OPENBLAS_USE_THREAD=0 或make OPENBLAS_TARGET_ARCH=NEHALEM 重建。两者都不能解决问题。还尝试了this python script (error downloading julia-1.6-latest ) 和these instructions to install via docker (standard_init_linux.go:228: exec user process caused: exec format error),但都无法正常工作。
我已经尝试了所有我可以在网上找到的东西。有人请帮忙!如何在 Pi Zero 上安装最新版本 (>v1.1.1) 的 Julia?
【问题讨论】:
-
要为 Linux ARM 安装最新的 Julia(LTS 版本),您可以按照此链接上的说明进行操作:julialang.org/downloads/platform/#linux_and_freebsd
-
对于 REPL 中的
Unsatisfiable requirements,您可以尝试:] rm General、add General、up General,这应该可以修复损坏的二进制文件。 -
嗨@MohammadSaad,感谢您的回答。我使用了您提供的链接中的 ARM 二进制文件,当我尝试运行它时出现错误
Illegal instruction。知道为什么吗? -
刚试过
] rm General,add General,up General,仍然得到同样的错误ERROR: Unsatisfiable requirements...。这里的问题不是我需要升级到 1.1.1 或更高版本吗?possible versions are: 1.1.1-1.1.2 or uninstalled
标签: audio compilation raspberry-pi julia portaudio