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


1、因為node項目終端報錯:

No receipt for 'com.apple.pkg.CLTools_Executables' found at '/'.

No receipt for 'com.apple.pkg.DeveloperToolsCLILeo' found at '/'.

No receipt for 'com.apple.pkg.DeveloperToolsCLI' found at '/'.

gyp: No Xcode or CLT version detected!
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1

2、查閱相關博客后有以下解決方案

終端輸入:

xcode-select --install

3、但未能解決問題,控制台

終端報錯:

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

4、終端輸入如下命令查看當前CLT(Command Line Tools)版本

brew config

5、最后找到解決辦法:

直接去Apple 官網下載最新版本的Command Line Tools安裝即可,然后再通過brew config查看當前CLI版本號是否變更
鏈接:https://developer.apple.com/download/more/


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM