MacOS常见安装工具问题

Mac OS X 执行“sudo xcodebuild -license”报错

安装Command Line Tools

登陆苹果开发者网站下载
https://developer.apple.com/downloads/

安装XCode

XCode到苹果App Store下载安装即可,App Store下载的Xcode会自动安装在\Applications路径下。

执行“sudo xcodebuild -license”

存在报错:

xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance

应该时目录的问题,然后切换目录:

sudo xcode-select --switch /Applications/Xcode.app/Contenst/Developer/

切换成功后如下命令可以正常执行:

xxx@MacBookPro QT-Projects % xcodebuild -showsdks    
iOS SDKs:
	iOS 14.2                      	-sdk iphoneos14.2

iOS Simulator SDKs:
	Simulator - iOS 14.2          	-sdk iphonesimulator14.2

macOS SDKs:
	DriverKit 20.0                	-sdk driverkit.macosx20.0
	macOS 11.0                    	-sdk macosx11.0

tvOS SDKs:
	tvOS 14.2                     	-sdk appletvos14.2

tvOS Simulator SDKs:
	Simulator - tvOS 14.2         	-sdk appletvsimulator14.2

watchOS SDKs:
	watchOS 7.1                   	-sdk watchos7.1

watchOS Simulator SDKs:
	Simulator - watchOS 7.1       	-sdk watchsimulator7.1

然后在执行指令

安装Mercurial

需要在命令行中输入:

sudo easy_install mercurial

输入管理员密码后将自动下载并安装

最后就可以用hg来更新源代码,例如:

# hg clone http://hg.videolan.org/x265

Mac OS X使用brew特别慢的问题解决方法

解决方案:替换为中科大的镜像源。

  1. 替换brew.git:
    cd “$(brew --repo)”
    git remote set-url origin https://mirrors.ustc.edu.cn/brew.git

  2. 替换homebrew-core.git:
    cd “$(brew --repo)/Library/Taps/homebrew/homebrew-core”
    git remote set-url origin https://mirrors.ustc.edu.cn/homebrew-core.git

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值