简体   繁体   中英

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 :

/bin/sh: 1: pkg-config: not found gyp: Call to 'pkg-config pixman-1 --libs' returned exit status 127 while in binding.gyp. while trying to load binding.gyp

Error: gyp failed with exit code: 1

I have tried installing pkg-config with brew, but having the same error.
Does anyone have idea about this issue? I also have rosetta installed.

Answer suggested here worked for me: Problem running npm install - newbie here

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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