简体   繁体   English

无法在 m1 Mac 上通过自制软件安装 nano

[英]Can't install nano via homebrew on m1 Mac

My main goal was to have syntax highlighting for nano.我的主要目标是为 nano 突出显示语法。 Apparently my nano seems to be pico 5.09 instead of nano.显然我的 nano 似乎是 pico 5.09 而不是 nano。 Running which nano , returns:运行which nano ,返回:

/usr/bin/nano

Then I tried to install the real nano with brew, there I get this error:然后我尝试用brew安装真正的nano,我得到了这个错误:

Warning: Treating nano as a formula. For the cask, use homebrew/cask/nano
Error: nano dependencies not built for the arm64 CPU architecture:
  gettext was built for x86_64

I think brew looks like the legit arm version.我认为 brew 看起来像合法的 arm 版本。

which brew
/opt/homebrew/bin/brew

What could I do to have the end result of Nano with syntax highlighting?我能做些什么来获得带有语法突出显示的 Nano 的最终结果?

If your brew dependencies are out of date, this could happen.如果您的 brew 依赖项已过期,则可能会发生这种情况。

% brew update && brew upgrade && brew install nano
Already up-to-date.
...
% brew install nano
Warning: Treating nano as a formula. For the cask, use homebrew/cask/nano
==> Downloading https://ghcr.io/v2/homebrew/core/nano/manifests/6.4
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/nano/blobs/sha256:7206f1c20ac7f
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sh
######################################################################## 100.0%
==> Pouring nano--6.4.arm64_monterey.bottle.tar.gz
==> nano cask is installed, skipping link.
🍺  /opt/homebrew/Cellar/nano/6.4: 103 files, 3.2MB
==> Running `brew cleanup nano`...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).

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

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