我使用的命令:arch -arm64 brew install v8@3.15
在这里,我得到了一个错误:
Error: v8@3.15: no bottle available!
You can try to install from source with:
brew install --build-from-source v8@3.15
Please note building from source is unsupported. You will encounter build
failures with some formulae. If you experience any issues please create pull
requests instead of asking for help on Homebrew's GitHub, Twitter or any other
official channels.
发布于 2022-01-10 13:55:40
这是因为您还没有用arch -arm64
选项安装brew。
如果您使用这些步骤执行,它应该会工作:
$ arch -x86_64 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
将其附加到您的.bashrc或.zshrc中,并将其源化:
alias ibrew="arch -x86_64 brew"
export PATH="/usr/local/homebrew/bin:$PATH"
安装libv8:
$ ibrew install v8@3.15
安装ruby (可能是常见的情况):
$ ibrew install rbenv
$ arch -x86_64 rbenv install <ruby_version>
$ arch -x86_64 rbenv global <ruby_version>
将其附加到您的.bashrc或.zshrc中,并将其源化:
eval "$(rbenv init -)"
修正libv8问题:
$ gem install libv8 -v '<your version>' -- --with-system-v8
$ gem install therubyracer -v '<your version>' -- --with-v8-dir=$(ibrew --prefix v8@3.15)
发布于 2021-08-25 12:04:01
消息告诉您,自制软件没有v8@3.15的arm64
版本。
如果您检查v8@3.15的公式,您可以看到以下几行:
bottle do
sha256 cellar: :any, big_sur: "8d1b84feddb4827106ad10d573f41fc6f4c1ddf6cbc65d78d8e168d7ab541e07"
sha256 cellar: :any, catalina: "588e9a3b61c54705d918bc783e1aa2efa1fd31626ca20181c7fe3c38d0d50ca5"
sha256 cellar: :any, mojave: "38ef56c652ac4f91ec1ddac61b8719ffba4c949103a6636e15aa1cd768e2d14d"
sha256 cellar: :any, high_sierra: "42c0c3b3f4dc7153023e14aef59c623f10c78ffe8f2d7a43ab984f2810a694dd"
sha256 cellar: :any, sierra: "4b845ce6a7fdc4110518dfbf48ab721d7f48b9e64f78e6d1cc199078ac9d874b"
sha256 cellar: :any, el_capitan: "9c191175be793dba50999f5ac1894f26b9eb39ca231f0618d5954833e5db8945"
sha256 cellar: :any, yosemite: "f3b4dddabc17df3d84c3e1bbd894fa33a60e221a150eb7ede77d64daaef1088b"
end
没有列出arm64
构建。这可能是(但我还没有检查过)这个版本的v8将不能在arm64上编译,或者在自制团队中没有优先权为它提供一个瓶子。
如果将其与v8进行比较,可以看到最新版本具有arm64
支持。
bottle do
sha256 cellar: :any, arm64_big_sur: "40fe7744bd7dd356f3ded64b55e3e41583601a5fa747df259bacbd251e161a8c"
sha256 cellar: :any, big_sur: "68faad4ab0421a40086d0187e48dea562d1f429499073a93b653ac261f38e2b1"
sha256 cellar: :any, catalina: "3ce161a6680de885fd14d4c419ccc0a6061d75dbe4c2e94ac2f402004212f878"
sha256 cellar: :any, mojave: "6af3d70c93d53e095363fa0ccf7a4e2e725cfef3ca0b7584ebe32a653460cb72"
sha256 cellar: :any_skip_relocation, x86_64_linux: "af6919d3fb249b607ee98e1dba60ecb70b53c2ce07db1cf33eb8f917950f51ad"
end
发布于 2021-08-25 17:02:14
V8 3.15是从2012年12月开始的,因此在苹果M1硬件上已经有8年的历史了。尝试使用V8 9.2,这是当前稳定的版本。(我认为M1是在8.7及以后正式支持的。)
撇开M1和V8不说,任何人都不应该使用有8年历史的JavaScript引擎。
https://stackoverflow.com/questions/68922404
复制相似问题