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