File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -50,12 +50,23 @@ brew install mysql-client
5050brew install libpq
5151brew tap ringohub/redis-cli; brew install redis-cli
5252```
53- 安装历史版本
53+ 安装不同版本包(例如python的不同版本)
5454``` bash
5555brew search {$name }
5656brew install {$name }@{$version }
5757```
5858
59+ 安装指定包的历史版本(brew 默认只能安装最新版本包)
60+ ``` bash
61+ # 举例:安装openjdk@11的11.0.27版本(老版本),最新版是11.0.28
62+ # 1.去https://github.com/Homebrew/homebrew-core/tree/main/Formula找到历史版本包,下载rb文件(可通过git history找到)
63+ wget https://raw.githubusercontent.com/Homebrew/homebrew-core/81e8cf683be640a8da5dc4f3da40e3298d947dbe/Formula/o/openjdk@11.rb
64+ # 2.因brew不允许直接从本地文件安装,需要创建插件仓库后安装
65+ brew tap-new miaoyc/oldjdk
66+ cp openjdk@11.rb /opt/homebrew/Library/Taps/miaoyc/homebrew-oldjdk/Formula
67+ brew install miaoyc/oldjdk/openjdk@11
68+ ```
69+
5970### Docker
6071[ Docker Desktop for Mac] ( https://docs.docker.com/desktop/install/mac-install/ )
6172
You can’t perform that action at this time.
0 commit comments