banli17 / note

学习记录
https://banli17.github.io/note/docs/intro
MIT License
17 stars 2 forks source link

imagemagick常见问题 #133

Open banli17 opened 2 years ago

banli17 commented 2 years ago

报错

Package ImageMagick++ was not found in the pkg-config search path.
Perhaps you should add the directory containing `ImageMagick++.pc'
to the PKG_CONFIG_PATH environment variable
No package 'ImageMagick++' found
gyp: Call to 'pkg-config --cflags ImageMagick++' returned exit status 1 while in binding.gyp. while trying to load binding.gyp

macos 解决方法:

brew install pkgconfig
vim ~/.bash_profile
export PKG_CONFIG_PATH="/opt/local/lib/pkgconfig:/usr/local/Cellar/imagemagick/7.0.8-66/lib/pkgconfig/Magick++.pc:$PKG_CONFIG_PATH"
source ~/.bash_profile 

查看是否配置好
pkg-config --cflags ImageMagick
banli17 commented 2 years ago

报错 ld: warning: dylib (/usr/local/Cellar/imagemagick/7.0.8-66/lib/libMagickCore-7.Q16HDRI.dylib) was built for newer macOS version (10.14) than being linked (10.7)