以curl为例,因为切换了homebrew的源,当前默认版本为7.67.0,而官方源的默认版本为7.69.1,如今须要安装官方源的默认版本。(同理,其余老版本也能够使用该方法)git
查看软件包来源github
$ brew info curl
执行上述命令获得结果:shell
From: https://mirrors.ustc.edu.cn/homebrew- core.git/Formula/curl.rb
因为换源的缘故,获得的结果是国内源的路径。浏览器
Github中查看rb版本信息curl
官方源的路径为https://github.com/Homebrew/homebrew-core/blob/master/Formula/
+ 软件名.rb,以curl为例,路径为:url
https://github.com/Homebrew/homebrew-core/blob/master/Formula/curl.rb
将该路径复制到浏览器中,点击Raw
按钮能够得到curl.rb源文件url:code
https://raw.githubusercontent.com/Homebrew/homebrew-core/master/Formula/curl.rb
History
查看历史提交。安装指定版本orm
执行命令:homebrew
$ brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/master/Formula/curl.rb