【问题标题】:How to fix error when installing libjpeg in M1 MacBook Pro?在 M1 MacBook Pro 中安装 libjpeg 时如何修复错误?
【发布时间】:2021-09-24 18:14:49
【问题描述】:

我正在使用命令在 arm64 终端中安装 libjpeg

brew install libjpeg

但它给了我这个错误:

Error: Cannot install in Homebrew on ARM processor in Intel default prefix (/usr/local)!
Please create a new installation in /opt/homebrew using one of the
"Alternative Installs" from:
  https://docs.brew.sh/Installation
You can migrate your previously installed formula list with:
  brew bundle dump

这是什么意思?以及如何解决? 提前谢谢你们。

【问题讨论】:

    标签: python macos terminal homebrew arm64


    【解决方案1】:

    在终端中运行此命令:

    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
    

    在终端运行:

    touch .zshrc
    

    用TextEdit打开它进行编辑(它是一个隐藏文件,所以shift + command + . 会取消隐藏它)

    在 .zshrc 的末尾添加这一行:

    export PATH=/opt/homebrew/bin:$PATH
    

    在终端中运行它以使其可用:

    source ~/.zshrc
    

    检查以确保它有效:

    brew help
    

    【讨论】:

      猜你喜欢
      • 2023-02-20
      • 2022-01-18
      • 2022-09-29
      • 1970-01-01
      • 1970-01-01
      • 2021-04-24
      • 2023-02-17
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多