Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sudo xcodebuild -license报错:解决方案 #23

Open
AndyZhou6688 opened this issue Dec 20, 2024 · 0 comments
Open

sudo xcodebuild -license报错:解决方案 #23

AndyZhou6688 opened this issue Dec 20, 2024 · 0 comments

Comments

@AndyZhou6688
Copy link

笑来老师您好,在学习您的Apple电脑操作教程,Terminal设置中出现以下报错,通过Google和Gemini找到解决方案,贴在这里,希望能帮助到遇到同样问题的同学。
image
报错信息:
andy@AndydeMac-mini ~ % xcode-select --install
xcode-select: note: Command line tools are already installed. Use "Software Update" in System Settings or the softwareupdate command line interface to install updates
andy@AndydeMac-mini ~ % sudo xcodebuild -license
Password:
Sorry, try again.
Password:
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
andy@AndydeMac-mini ~ %
解决方案:
第一步:xcode-select --install
第二步:sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
第三步:sudo xcodebuild -license

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant