Mac OS找不到/usr/include文件夹的解决办法


Mojave最新解决方案:
终端执行:

xcode-select --install
#完成后执行
sudo installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target / 

若执行 xcode-select --install 出现错误:

xcode-select: error: command line tools are already installed, use "Software Update" to install updates

解决办法:

$ rm -rf /Library/Developer/CommandLineTools
$ xcode-select --install

如果提示权限不够那么加上sudo


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM