简体   繁体   English

在 macOS M1 上找不到 pkg-config 问题

[英]pkg-config not found issue on macOS M1


I think I have tried most of the solutions/suggestions on internet for this issue. 我想我已经为这个问题尝试了互联网上的大多数解决方案/建议。
I'm using macOS Monterey / M1 Max / node version 10., and facing this error saying : 我正在使用 macOS Monterey / M1 Max / node 版本 10.,并面临这个错误说:

/bin/sh: 1: pkg-config: not found gyp: Call to 'pkg-config pixman-1 --libs' returned exit status 127 while in binding.gyp. /bin/sh: 1: pkg-config: not found gyp: 在 binding.gyp 中调用“pkg-config pixman-1 --libs”返回退出状态 127。 while trying to load binding.gyp在尝试加载 binding.gyp 时

Error: gyp failed with exit code: 1错误: gyp失败,退出代码:1

I have tried installing pkg-config with brew, but having the same error.我曾尝试使用 brew 安装 pkg-config,但出现相同的错误。
Does anyone have idea about this issue?有人知道这个问题吗? I also have rosetta installed.我也安装了rosetta。

Answer suggested here worked for me: Problem running npm install - newbie here此处建议的答案对我有用: 运行 npm install 时出现问题 - 新手在这里

brew install pkg-config cairo pango libpng jpeg giflib librsvg
npm install -g canvas

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

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