python - 在 M1 MacBook Pro 中安装 libjpeg 时如何修复错误?
问题描述
我正在使用命令在 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
这是什么意思?以及如何解决?提前谢谢你们。
解决方案
在终端中运行此命令:
/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
推荐阅读
- google-apps-script - 用 URLFetchApp 替换 =ImportHTML
- r - 从 R 包中的 C 调用 R `cor()` 函数?
- python - 极坐标图matplotlib中的直线不接触
- r - 双括号(即 {{}}、大花括号)在 tidyr::complete() 和 tidyr::nesting() 中不起作用
- python - Python:从字体 .otf 文件生成字符 SVG
- input - 如何在输入滑块的特定值上显示 div
- javascript - 为什么即使变量没有更改,@HostBinding 也会连续触发?(角度)
- sql - 组中的最后一个值,每种类型一列
- javascript - Discord.js 在会员加入时创建频道
- spring-webflux - Spring Mongo Reactive - OnErrorResume 不起作用