TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Run x86 Apps (including homebrew) in the Terminal on Apple Silicon

224 点作者 JoshuaMulliken超过 4 年前

22 条评论

ryancnelson超过 4 年前
There&#x27;s also the &quot;arch&quot; command, to run commands under rosetta2<p>I just installed Homebrew on my new m1 MacBook Air with:<p>$ arch -x86_64 &#x2F;bin&#x2F;bash -c &quot;$(curl -fsSL <a href="https:&#x2F;&#x2F;raw.githubusercontent.com&#x2F;Homebrew&#x2F;install&#x2F;master&#x2F;install.sh" rel="nofollow">https:&#x2F;&#x2F;raw.githubusercontent.com&#x2F;Homebrew&#x2F;install&#x2F;master&#x2F;in...</a>)&quot;
评论 #25134535 未加载
评论 #25136011 未加载
评论 #25132700 未加载
评论 #25133004 未加载
评论 #25133650 未加载
Ericson2314超过 4 年前
I wonder if Nix on macOS could become a better homebrew-killer by supporting Apple Silicon first. We already do aarch64-linux natively and some iOS cross compilation, so that should give us a head start.
评论 #25135081 未加载
评论 #25134219 未加载
评论 #25144461 未加载
评论 #25133791 未加载
评论 #25134729 未加载
评论 #25133351 未加载
评论 #25140244 未加载
sjmulder超过 4 年前
pkgsrc, &#x27;the portable package manager&#x27;, support Apple Silicon:<p><a href="http:&#x2F;&#x2F;pkgsrc.org&#x2F;" rel="nofollow">http:&#x2F;&#x2F;pkgsrc.org&#x2F;</a><p>No binary packages yet, but using it from source is pretty much a matter of downloading and extracting the &#x27;current bz2&#x27;, then:<p><pre><code> cd pkgrsc&#x2F;bootstrap .&#x2F;bootstrap --prefix=&#x2F;opt&#x2F;pkg </code></pre> The default prefix is &#x2F;usr&#x2F;pkg, but that&#x27;s protected by macOS&#x27; SPI. You might want to add &#x2F;opt&#x2F;pkg&#x2F;bin and sbin to your $PATH. Then to install a package:<p><pre><code> cd pkgsrc&#x2F;sysutils&#x2F;nnn bmake install clean </code></pre> Full documentation, including on how to create your own packages:<p><a href="http:&#x2F;&#x2F;www.netbsd.org&#x2F;docs&#x2F;pkgsrc&#x2F;" rel="nofollow">http:&#x2F;&#x2F;www.netbsd.org&#x2F;docs&#x2F;pkgsrc&#x2F;</a>
评论 #25143298 未加载
Aperocky超过 4 年前
That&#x27;s not needed though, I manually extracted brew to &#x2F;opt&#x2F;homebrew per <a href="https:&#x2F;&#x2F;docs.brew.sh&#x2F;Installation" rel="nofollow">https:&#x2F;&#x2F;docs.brew.sh&#x2F;Installation</a>, and it works just fine in the native terminal.<p>file htop returns<p>htop: Mach-O 64-bit executable arm64<p>So this version of brew is compiling native arm64 code.
评论 #25133014 未加载
评论 #25132988 未加载
评论 #25132836 未加载
zymhan超过 4 年前
Does Macports support Apple ARM? They have a Big Sur compatible version, so I&#x27;m inclined to think it can at least try compiling natively.<p><a href="https:&#x2F;&#x2F;www.macports.org&#x2F;install.php" rel="nofollow">https:&#x2F;&#x2F;www.macports.org&#x2F;install.php</a>
评论 #25133835 未加载
评论 #25133519 未加载
评论 #25134413 未加载
therealmarv超过 4 年前
That won&#x27;t help running Docker and VirtualBox. There&#x27;s also a big chance VirtualBox will never make it to M1 ;(
评论 #25135277 未加载
lights0123超过 4 年前
Huh, so Apple is installing both the ARM and x86 version of apps, even on ARM computers. I guess that makes sense for portability, but I don&#x27;t know if other parts of the root filesystem are one architecture only, such as the path to the kernel (unless that&#x27;s a fat binary too?).
评论 #25132608 未加载
评论 #25134311 未加载
评论 #25132914 未加载
评论 #25133512 未加载
评论 #25132905 未加载
varispeed超过 4 年前
Would running X86 require licensing? If Intel doesn&#x27;t say anything then could Apple in a couple of years develop their own X86 CPU by turning Rosetta into a hardware solutions? Technically it should be possible - as Transmeta has done something similar, but cannot find if they got a license from Intel or it was not needed. <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Transmeta" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Transmeta</a>
评论 #25138712 未加载
评论 #25144497 未加载
teilo超过 4 年前
I was surprised to see that we got native Ruby 2.6 and Python 3.8 in the box. I thought Apple had deprecated scripting languages.
评论 #25133172 未加载
lukasM1超过 4 年前
I&#x27;m trying to run some python code (from Pycharm). Since the specific version of tensorflow i need is not compatible with M1, I already get stuck at import tensorflow. How can i tell my mac to Rosetta 2? I know when I want to run something specific from the terminal, I can use &quot;arch -x86_64&quot;... but what do I do here?
a-dub超过 4 年前
are there any benchmarks of x86-64 homebrew ports running under rosetta2 vs the last generation of intel macs?<p>how about stuff like python, webservers or java apps running in x86-64 linux docker containers?<p>very curious what the effects are of the new arch on common developer use cases. (without having to recompile&#x2F;rebuild everything for apple arm)
评论 #25136729 未加载
asveikau超过 4 年前
I haven&#x27;t kept up too much about how they did this. Is this ultimately just about faking uname(2) in the homebrew scripts? I would imagine Apple would make the mach-o loader transparently run rosetta when they see an x86 binary in response to execve(2). In other words, why doesn&#x27;t it &quot;just work&quot;?
评论 #25133643 未加载
评论 #25133532 未加载
arthurcolle超过 4 年前
Hi OP, sorry for the aside, but how do you take good looking terminal photos like the first pic in the post?
评论 #25133959 未加载
teilo超过 4 年前
Or just use iTerm, which is Intel-only so far.
评论 #25133314 未加载
obilgic超过 4 年前
Or manually install by just git cloning, so that everything else compiles for the m1, instead of using x86
bstar77超过 4 年前
Does anyone know if arm64 compiled javascript binaries will work on x86 systems?
评论 #25174465 未加载
jzer0cool超过 4 年前
Does this mean you can run almost any app you had before M1 in x86 mode?
评论 #25137359 未加载
评论 #25136058 未加载
cmiljkovic超过 4 年前
when software like brew finally becomes available on Apple Silicon natively. How can I delete all this stuff I need to download under Rosetta? I don&#x27;t want to have duplicate stuff
评论 #25144416 未加载
fnord77超过 4 年前
a little more info on rosetta2<p><a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Rosetta_(software)#Rosetta_2" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Rosetta_(software)#Rosetta_2</a>
评论 #25133518 未加载
mathfailure超过 4 年前
no, thanks.
supergirl超过 4 年前
why do people keep using this marketing fluff word &quot;Apple Silicon&quot;? should just call it Apple M1
评论 #25134401 未加载
评论 #25135232 未加载
评论 #25136061 未加载
codecamper超过 4 年前
crazy apple forgot to do this. they are forgetting their base, as per usual.