美文网首页
mac m1 pcre.h 找不到

mac m1 pcre.h 找不到

作者: 超鸽带你飞 | 来源:发表于2022-04-25 13:56 被阅读0次

报错:

vendor/git.in.zhihu.com/arches/golang-pkg-pcre/src/pkg/pcre/pcre.go:52:10: fatal error: 'pcre.h' file not found

解决:
brew install pcre

找到这个文件的地址
brew list pcre | grep 'pcre.h$'
/opt/homebrew/Cellar/pcre/8.45/include/pcre.h

程序搜索的地址
cpp -v

/Library/Developer/CommandLineTools/usr/include # 这个地址

brew 安装地址和程序搜索地址不一样,所以需要软链过去
sudo ln -s /opt/homebrew/Cellar/pcre/8.45/include/pcre.h /Library/Developer/CommandLineTools/usr/include

相关文章

网友评论

      本文标题:mac m1 pcre.h 找不到

      本文链接:https://www.haomeiwen.com/subject/lcvfyrtx.html